diff --git a/aur/hd-idle/src/hd-idle-1.01.tgz b/aur/hd-idle/src/hd-idle-1.01.tgz deleted file mode 120000 index b672bcebd..000000000 --- a/aur/hd-idle/src/hd-idle-1.01.tgz +++ /dev/null @@ -1 +0,0 @@ -/build/sources/hd-idle-1.01.tgz \ No newline at end of file diff --git a/aur/hd-idle/src/hd-idle-1.01/CHANGES b/aur/hd-idle/src/hd-idle-1.01/CHANGES deleted file mode 100644 index 506fe71b6..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/CHANGES +++ /dev/null @@ -1,41 +0,0 @@ -Version 1.01 ------------- - -Features -- The parameter "-a" now also supports symlinks for disk names. Thus, disks - can be specified using something like /dev/disk/by-uuid/... Use "-d" to - verify that the resulting disk name is what you want. - - Please note that disk names are resolved to device nodes at startup. Also, - since many entries in /dev/disk/by-xxx are actually partitions, partition - numbers are automatically removed from the resulting device node. - -Bugs -- Not really a bug, but the disk name comparison used strstr which is a bit - useless because only disks starting with "sd" and a single letter after - that are currently considered. Replaced the comparison with strcmp() - -Version 1.00 ------------- - -Features -- New parameter "-a" to allow selecting idle timeouts for individual disks; - compatibility to previous releases is maintained by having an implicit - default which matches all SCSI disks - -Bugs -- Changed comparison operator for idle periods from '>' to '>=' to prevent - adding one polling interval to idle time -- Changed sleep time before calling sync after updating the log file to 1s - (from 3s) to accumulate fewer dirty blocks before synching. It's still - a compromize but the log file is for debugging purposes, anyway. A test - with fsync() was unsuccessful because the next bdflush-initiated sync - still caused spin-ups. - -Version 0.99 ------------- - -Features -- Initial version of hd-idle. - - diff --git a/aur/hd-idle/src/hd-idle-1.01/LICENSE b/aur/hd-idle/src/hd-idle-1.01/LICENSE deleted file mode 100644 index 86fd7031f..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/LICENSE +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/aur/hd-idle/src/hd-idle-1.01/Makefile b/aur/hd-idle/src/hd-idle-1.01/Makefile deleted file mode 100644 index 8281a79df..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -############################################################################### -# -# General Definitions -# -############################################################################### - -TARGET_DIR = /usr/local/sbin -SCRIPT_DIR = /etc - -LIB_DIRS = - -INC_DIRS = - -CC_DEBUG = -g -CFLAGS = $(CC_DEBUG) $(INC_DIRS) -Wall -CC = gcc -LD = $(CC) - -############################################################################### -# -# Main Dependencies -# -############################################################################### - -TARGET = hd-idle - -LIBS = - -SRCS = hd-idle.c - -OBJS = $(SRCS:.c=.o) - -all: $(TARGET) - -clean: - rm -f $(OBJS) $(TARGET) - -install: $(TARGET) - install -g root -o root $(TARGET) $(TARGET_DIR) - -install-debian: - install -g root -o root $(TARGET) /usr/sbin - install -g root -o root scripts/debian/init.d/hd-idle /etc/init.d - install -g root -o root scripts/debian/default/hd-idle /etc/default - @echo - @echo Please run \"update-rc.d hd-idle defaults\" to start hd-idle automatically - @echo and check /etc/default/hd-idle for configuration information - -hd-idle.o: hd-idle.c - -$(TARGET): $(OBJS) - $(LD) $(CC_DEBUG) -o $(TARGET) $(OBJS) $(LIB_DIRS) $(LIBS) - - diff --git a/aur/hd-idle/src/hd-idle-1.01/README b/aur/hd-idle/src/hd-idle-1.01/README deleted file mode 100644 index c50cc5496..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/README +++ /dev/null @@ -1,122 +0,0 @@ -Hard Disk Idle Spin-Down Utility -============================================================================== - -hd-idle is a utility program for spinning-down external disks after a period -of idle time. Since most external IDE disk enclosures don't support setting -the IDE idle timer, a program like hd-idle is required to spin down idle -disks automatically. - -A word of caution: hard disks don't like spinning up too often. Laptop disks -are more robust in this respect than desktop disks but if you set your disks -to spin down after a few seconds you may damage the disk over time due to the -stress the spin-up causes on the spindle motor and bearings. It seems that -manufacturers recommend a minimum idle time of 3-5 minutes, the default in -hd-idle is 10 minutes. - -One more word of caution: hd-idle will spin down any disk accessible via the -SCSI layer (USB, IEEE1394, ...) but it will NOT work with real SCSI disks -because they don't spin up automatically. Thus it's not called scsi-idle and -I don't recommend using it on a real SCSI system unless you have a kernel -patch that automatically starts the SCSI disks after receiving a sense buffer -indicating the disk has been stopped. Without such a patch, real SCSI disks -won't start again and you can as well pull the plug. - -You have been warned... - -The latest version of hd-idle can be found on SourceForge: - - http://hd-idle.sf.net - -hd-idle is not public domain software. It's copyrighted by myself, -Christian Mueller, according to the terms of the GNU General Public -License (GPL). Please see the file LICENSE for additional information. - -Copyright (c) Christian Mueller 2007 - -============================================================================== - -Installation ------------- - -The compile process is rather simple, thus there's no automake or configure -script at this point, just a makefile for Linux. Since hd-idle is using the -Linux generic SCSI layer, it requires the include files scsi/sg.h and -scsi/scsi.h which should come with libc6-dev (at least on Debian they do). - -* In order to compile the program, type "make". - -* In order to install the program into /usr/local/sbin, type "make install" - -* In order to install the program on a Debian system into /usr/sbin, - including scripts to automatically start hd-idle at system boot time, - type "make install-debian". Once completed, please run - "update-rc.d hd-idle defaults" and check /etc/default/hd-idle for - configuration information. The default settings will *not* start - hd-idle automatically. - -Running hd-idle ---------------- - -In order to run hd-idle, type "hd-idle". This will start hd-idle with the -default options, causing all SCSI (read: USB, Firewire, SCSI, ...) hard disks -to spin down after 10 minutes of inactivity. - -On a Debian system, after editing /etc/default/hd-idle and enabling it, -use "/etc/init.d/hd-idle start" to run hd-idle. - -Please note that hd-idle uses /proc/diskstats to read disk statistics. If -this file is not present, hd-idle won't work. - -In case of problems, use the debug option (-d) tp get further information. - -Command line options: - -a Set device name of disks for subsequent idle-time - parameters (-i). This parameter is optional in the - sense that there's a default entry for all disks - which are not named otherwise by using this - parameter. This can also be a symlink - (e.g. /dev/disk/by-uuid/...) - -i Idle time in seconds for the currently named disk(s) - (-a ) or for all disks. - -l Name of logfile (written only after a disk has spun - up). Please note that this option might cause the - disk which holds the logfile to spin up just because - another disk had some activity. This option should - not be used on systems with more than one disk - except for tuning purposes. On single-disk systems, - this option should not cause any additional spinups. - -Miscellaneous options: - -t Spin-down the specfified disk immediately and exit. - -d Debug mode. This will prevent hd-idle from - becoming a daemon and print debugging info to - stdout/stderr - -h Print usage information. - -Regarding the parameter "-a": - - Users of hd-idle have asked for means to set idle-time parameters for - individual disks. This makes a lot of sense, not only because some [SCSI] - disks may not react well to being stopped. Originally, hd-idle had one idle - time for all disks. The parameter "-a" can now be used to set a filter on - the disk's device name (omit /dev/) for subsequent idle-time settings. - - 1) A -i option before the first -a option will set the default idle time; - hence, compatibility with previous releases of hd-idle is maintained. - - 2) In order to disable spin-down of disks per default, and then re-enable - spin-down on selected disks, set the default idle time to 0. - - Example: - hd-idle -i 0 -n sda -i 300 -n sdb -i 1200 - - This example sets the default idle time to 0 (meaning hd-idle will never - try to spin down a disk), then sets explicit idle times for disks which - have the string "sda" or "sdb" in their device name. - -Stopping hd-idle ----------------- - -Use "killall hd-idle" to stop hd-idle. On a Debian system, use -"/etc/init.d/hd-idle stop". - diff --git a/aur/hd-idle/src/hd-idle-1.01/cvsenv.sh b/aur/hd-idle/src/hd-idle-1.01/cvsenv.sh deleted file mode 100644 index 63408902c..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/cvsenv.sh +++ /dev/null @@ -1,3 +0,0 @@ -export CVS_RSH=ssh -export CVSROOT=cjmueller@hd-idle.cvs.sourceforge.net:/cvsroot/hd-idle - diff --git a/aur/hd-idle/src/hd-idle-1.01/hd-idle.c b/aur/hd-idle/src/hd-idle-1.01/hd-idle.c deleted file mode 100644 index 9c0f8a2f9..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/hd-idle.c +++ /dev/null @@ -1,501 +0,0 @@ -/* - * hd-idle.c - external disk idle daemon - * - * Copyright (c) 2007 Christian Mueller. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* - * hd-idle is a utility program for spinning-down external disks after a period - * of idle time. Since most external IDE disk enclosures don't support setting - * the IDE idle timer, a program like hd-idle is required to spin down idle - * disks automatically. - * - * A word of caution: hard disks don't like spinning-up too often. Laptop disks - * are more robust in this respect than desktop disks but if you set your disks - * to spin down after a few seconds you may damage the disk over time due to the - * stress the spin-up causes on the spindle motor and bearings. It seems that - * manufacturers recommend a minimum idle time of 3-5 minutes, the default in - * hd-idle is 10 minutes. - * - * Please note that hd-idle can spin down any disk accessible via the SCSI - * layer (USB, IEEE1394, ...) but it will NOT work with real SCSI disks because - * they don't spin up automatically. Thus it's not called scsi-idle and I don't - * recommend using it on a real SCSI system unless you have a kernel patch that - * automatically starts the SCSI disks after receiving a sense buffer indicating - * the disk has been stopped. Without such a patch, real SCSI disks won't start - * again and you can as well pull the plug. - * - * You have been warned... - * - * CVS Change Log: - * --------------- - * - * $Log: hd-idle.c,v $ - * Revision 1.4 2010/02/26 14:03:44 cjmueller - * Version 1.01 - * ------------ - * - * Features - * - The parameter "-a" now also supports symlinks for disk names. Thus, disks - * can be specified using something like /dev/disk/by-uuid/... Use "-d" to - * verify that the resulting disk name is what you want. - * - * Please note that disk names are resolved to device nodes at startup. Also, - * since many entries in /dev/disk/by-xxx are actually partitions, partition - * numbers are automatically removed from the resulting device node. - * - * Bugs - * - Not really a bug, but the disk name comparison used strstr which is a bit - * useless because only disks starting with "sd" and a single letter after - * that are currently considered. Replaced the comparison with strcmp() - * - * Revision 1.3 2009/11/18 20:53:17 cjmueller - * Features - * - New parameter "-a" to allow selecting idle timeouts for individual disks; - * compatibility to previous releases is maintained by having an implicit - * default which matches all SCSI disks - * - * Bugs - * - Changed comparison operator for idle periods from '>' to '>=' to prevent - * adding one polling interval to idle time - * - Changed sleep time before calling sync after updating the log file to 1s - * (from 3s) to accumulate fewer dirty blocks before synching. It's still - * a compromize but the log file is for debugging purposes, anyway. A test - * with fsync() was unsuccessful because the next bdflush-initiated sync - * still caused spin-ups. - * - * Revision 1.2 2007/04/23 22:14:27 cjmueller - * Bug fixes - * - Comment changes; no functionality changes... - * - * Revision 1.1.1.1 2007/04/23 21:49:43 cjmueller - * initial import into CVS - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#define STAT_FILE "/proc/diskstats" -#define DEFAULT_IDLE_TIME 600 - -#define dprintf if (debug) printf - -/* typedefs and structures */ -typedef struct IDLE_TIME { - struct IDLE_TIME *next; - char *name; - int idle_time; -} IDLE_TIME; - -typedef struct DISKSTATS { - struct DISKSTATS *next; - char name[50]; - int idle_time; - time_t last_io; - time_t spindown; - time_t spinup; - unsigned int spun_down : 1; - unsigned int reads; - unsigned int writes; -} DISKSTATS; - -/* function prototypes */ -static void daemonize (void); -static DISKSTATS *get_diskstats (const char *name); -static void spindown_disk (const char *name); -static void log_spinup (DISKSTATS *ds); -static char *disk_name (char *name); - -/* global/static variables */ -IDLE_TIME *it_root; -DISKSTATS *ds_root; -char *logfile = "/dev/null"; -int debug; - -/* main function */ -int main(int argc, char *argv[]) -{ - IDLE_TIME *it; - int have_logfile = 0; - int min_idle_time; - int sleep_time; - int opt; - - /* create default idle-time parameter entry */ - if ((it = malloc(sizeof(*it))) == NULL) { - fprintf(stderr, "out of memory\n"); - exit(1); - } - it->next = NULL; - it->name = NULL; - it->idle_time = DEFAULT_IDLE_TIME; - it_root = it; - - /* process command line options */ - while ((opt = getopt(argc, argv, "t:a:i:l:dh")) != -1) { - switch (opt) { - - case 't': - /* just spin-down the specified disk and exit */ - spindown_disk(optarg); - return(0); - - case 'a': - /* add a new set of idle-time parameters for this particular disk */ - if ((it = malloc(sizeof(*it))) == NULL) { - fprintf(stderr, "out of memory\n"); - return(2); - } - it->name = disk_name(optarg); - it->idle_time = DEFAULT_IDLE_TIME; - it->next = it_root; - it_root = it; - break; - - case 'i': - /* set idle-time parameters for current (or default) disk */ - it->idle_time = atoi(optarg); - break; - - case 'l': - logfile = optarg; - have_logfile = 1; - break; - - case 'd': - debug = 1; - break; - - case 'h': - printf("usage: hd-idle [-t ] [-a ] [-i ] [-l ] [-d] [-h]\n"); - return(0); - - case ':': - fprintf(stderr, "error: option -%c requires an argument\n", optopt); - return(1); - - case '?': - fprintf(stderr, "error: unknown option -%c\n", optopt); - return(1); - } - } - - /* set sleep time to 1/10th of the shortest idle time */ - min_idle_time = 1 << 30; - for (it = it_root; it != NULL; it = it->next) { - if (it->idle_time != 0 && it->idle_time < min_idle_time) { - min_idle_time = it->idle_time; - } - } - if ((sleep_time = min_idle_time / 10) == 0) { - sleep_time = 1; - } - - /* daemonize unless we're running in debug mode */ - if (!debug) { - daemonize(); - } - - /* main loop: probe for idle disks and stop them */ - for (;;) { - DISKSTATS tmp; - FILE *fp; - char buf[200]; - - if ((fp = fopen(STAT_FILE, "r")) == NULL) { - perror(STAT_FILE); - return(2); - } - - memset(&tmp, 0x00, sizeof(tmp)); - - while (fgets(buf, sizeof(buf), fp) != NULL) { - if (sscanf(buf, "%*d %*d %s %*u %*u %u %*u %*u %*u %u %*u %*u %*u %*u", - tmp.name, &tmp.reads, &tmp.writes) == 3) { - DISKSTATS *ds; - time_t now = time(NULL); - - /* make sure this is a SCSI disk (sd[a-z]) */ - if (tmp.name[0] != 's' || - tmp.name[1] != 'd' || - !isalpha(tmp.name[2]) || - tmp.name[3] != '\0') { - continue; - } - - dprintf("probing %s: reads: %d, writes: %d\n", tmp.name, tmp.reads, tmp.writes); - - /* get previous statistics for this disk */ - ds = get_diskstats(tmp.name); - - if (ds == NULL) { - /* new disk; just add it to the linked list */ - if ((ds = malloc(sizeof(*ds))) == NULL) { - fprintf(stderr, "out of memory\n"); - return(2); - } - memcpy(ds, &tmp, sizeof(*ds)); - ds->last_io = now; - ds->spinup = ds->last_io; - ds->next = ds_root; - ds_root = ds; - - /* find idle time for this disk (falling-back to default; default means - * 'it->name == NULL' and this entry will always be the last due to the - * way this single-linked list is built when parsing command line - * arguments) - */ - for (it = it_root; it != NULL; it = it->next) { - if (it->name == NULL || !strcmp(ds->name, it->name)) { - ds->idle_time = it->idle_time; - break; - } - } - - } else if (ds->reads == tmp.reads && ds->writes == tmp.writes) { - if (!ds->spun_down) { - /* no activity on this disk and still running */ - if (ds->idle_time != 0 && now - ds->last_io >= ds->idle_time) { - spindown_disk(ds->name); - ds->spindown = now; - ds->spun_down = 1; - } - } - - } else { - /* disk had some activity */ - if (ds->spun_down) { - /* disk was spun down, thus it has just spun up */ - if (have_logfile) { - log_spinup(ds); - } - ds->spinup = now; - } - ds->reads = tmp.reads; - ds->writes = tmp.writes; - ds->last_io = now; - ds->spun_down = 0; - } - } - } - - fclose(fp); - sleep(sleep_time); - } - - return(0); -} - -/* become a daemon */ -static void daemonize(void) -{ - int maxfd; - int i; - - /* fork #1: exit parent process and continue in the background */ - if ((i = fork()) < 0) { - perror("couldn't fork"); - exit(2); - } else if (i > 0) { - _exit(0); - } - - /* fork #2: detach from terminal and fork again so we can never regain - * access to the terminal */ - setsid(); - if ((i = fork()) < 0) { - perror("couldn't fork #2"); - exit(2); - } else if (i > 0) { - _exit(0); - } - - /* change to root directory and close file descriptors */ - chdir("/"); - maxfd = getdtablesize(); - for (i = 0; i < maxfd; i++) { - close(i); - } - - /* use /dev/null for stdin, stdout and stderr */ - open("/dev/null", O_RDONLY); - open("/dev/null", O_WRONLY); - open("/dev/null", O_WRONLY); -} - -/* get DISKSTATS entry by name of disk */ -static DISKSTATS *get_diskstats(const char *name) -{ - DISKSTATS *ds; - - for (ds = ds_root; ds != NULL; ds = ds->next) { - if (!strcmp(ds->name, name)) { - return(ds); - } - } - - return(NULL); -} - -/* spin-down a disk */ -static void spindown_disk(const char *name) -{ - struct sg_io_hdr io_hdr; - unsigned char sense_buf[255]; - char dev_name[100]; - int fd; - - dprintf("spindown: %s\n", name); - - /* fabricate SCSI IO request */ - memset(&io_hdr, 0x00, sizeof(io_hdr)); - io_hdr.interface_id = 'S'; - io_hdr.dxfer_direction = SG_DXFER_NONE; - - /* SCSI stop unit command */ - io_hdr.cmdp = (unsigned char *) "\x1b\x00\x00\x00\x00\x00"; - - io_hdr.cmd_len = 6; - io_hdr.sbp = sense_buf; - io_hdr.mx_sb_len = (unsigned char) sizeof(sense_buf); - - /* open disk device (kernel 2.4 will probably need "sg" names here) */ - snprintf(dev_name, sizeof(dev_name), "/dev/%s", name); - if ((fd = open(dev_name, O_RDONLY)) < 0) { - perror(dev_name); - return; - } - - /* execute SCSI request */ - if (ioctl(fd, SG_IO, &io_hdr) < 0) { - char buf[100]; - snprintf(buf, sizeof(buf), "ioctl on %s:", name); - perror(buf); - - } else if (io_hdr.masked_status != 0) { - fprintf(stderr, "error: SCSI command failed with status 0x%02x\n", - io_hdr.masked_status); - } - - close(fd); -} - -/* write a spin-up event message to the log file */ -static void log_spinup(DISKSTATS *ds) -{ - FILE *fp; - - if ((fp = fopen(logfile, "a")) != NULL) { - /* Print statistics to logfile - * - * Note: This doesn't work too well if there are multiple disks - * because the I/O we're dealing with might be on another - * disk so we effectively wake up the disk the log file is - * stored on as well. Then again the logfile is a debugging - * option, so what... - */ - time_t now = time(NULL); - char tstr[20]; - char dstr[20]; - - strftime(dstr, sizeof(dstr), "%Y-%m-%d", localtime(&now)); - strftime(tstr, sizeof(tstr), "%H:%M:%S", localtime(&now)); - fprintf(fp, - "date: %s, time: %s, disk: %s, running: %ld, stopped: %ld\n", - dstr, tstr, ds->name, - (long) ds->spindown - (long) ds->spinup, - (long) time(NULL) - (long) ds->spindown); - - /* Sync to make sure writing to the logfile won't cause another - * spinup in 30 seconds (or whatever bdflush uses as flush interval). - */ - fclose(fp); - sleep(1); - sync(); - } -} - -/* Resolve disk names specified as "/dev/disk/by-xxx" or some other symlink. - * Please note that this function is only called during command line parsing - * and hd-idle per se does not support dynamic disk additions or removals at - * runtime. - * - * This might change in the future but would require some fiddling to avoid - * needless overhead -- after all, this was designed to run on tiny embedded - * devices, too. - */ -static char *disk_name(char *path) -{ - ssize_t len; - char buf[256]; - char *s; - - if (*path != '/') { - /* just a disk name without /dev prefix */ - return(path); - } - - if ((len = readlink(path, buf, sizeof(buf) - 1)) <= 0) { - if (errno != EINVAL) { - /* couldn't resolve disk name */ - return(path); - } - - /* 'path' is not a symlink */ - strncpy(buf, path, sizeof(buf) - 1); - buf[sizeof(buf)-1] = '\0'; - len = strlen(buf); - } - buf[len] = '\0'; - - /* remove partition numbers, if any */ - for (s = buf + strlen(buf) - 1; s >= buf && isdigit(*s); s--) { - *s = '\0'; - } - - /* Extract basename of the disk in /dev. Note that this assumes that the - * final target of the symlink (if any) resolves to /dev/sd* - */ - if ((s = strrchr(buf, '/')) != NULL) { - s++; - } else { - s = buf; - } - - if ((s = strdup(s)) == NULL) { - fprintf(stderr, "out of memory"); - exit(2); - } - - if (debug) { - printf("using %s for %s\n", s, path); - } - return(s); -} diff --git a/aur/hd-idle/src/hd-idle-1.01/scripts/debian/default/hd-idle b/aur/hd-idle/src/hd-idle-1.01/scripts/debian/default/hd-idle deleted file mode 100644 index a575c556f..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/scripts/debian/default/hd-idle +++ /dev/null @@ -1,30 +0,0 @@ -# defaults file for hd-idle - -# start hd-idle automatically? -START_HD_IDLE=false - -# hd-idle command line options -# Options are: -# -a Set device name of disks for subsequent idle-time -# parameters (-i). This parameter is optional in the -# sense that there's a default entry for all disks -# which are not named otherwise by using this -# parameter. This can also be a symlink -# (e.g. /dev/disk/by-uuid/...) -# -i Idle time in seconds. -# -l Name of logfile (written only after a disk has spun -# up). Please note that this option might cause the -# disk which holds the logfile to spin up just because -# another disk had some activity. This option should -# not be used on systems with more than one disk -# except for tuning purposes. On single-disk systems, -# this option should not cause any additional spinups. -# -# Options not exactly useful here: -# -t Spin-down the specfified disk immediately and exit. -# -d Debug mode. This will prevent hd-idle from -# becoming a daemon and print debugging info to -# stdout/stderr -# -h Print usage information. -#HD_IDLE_OPTS="-i 180 -l /var/log/hd-idle.log" - diff --git a/aur/hd-idle/src/hd-idle-1.01/scripts/debian/init.d/hd-idle b/aur/hd-idle/src/hd-idle-1.01/scripts/debian/init.d/hd-idle deleted file mode 100755 index d0d826335..000000000 --- a/aur/hd-idle/src/hd-idle-1.01/scripts/debian/init.d/hd-idle +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -### BEGIN INIT INFO -# Provides: hd-idle -# Required-Start: $local_fs -# Required-Stop: $local_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: start hd-idle daemon (spin down idle hard disks) -### END INIT INFO - - -PATH=/sbin:/bin:/usr/sbin:/usr/bin - -DAEMON=/usr/sbin/hd-idle -HD_IDLE_OPTS="-i 600" -START_HD_IDLE=false - -[ -r /etc/default/hd-idle ] && . /etc/default/hd-idle - -if [ "$START_HD_IDLE" != "true" ] ; then - exit 0 -fi - -# See if the daemon is there -test -x $DAEMON || exit 0 - -. /lib/lsb/init-functions - -case "$1" in - start) - log_daemon_msg "Starting the hd-idle daemon" "hd-idle" - - start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $HD_IDLE_OPTS - - log_end_msg $? - ;; - - stop) - log_daemon_msg "Stopping the hd-idle daemon" "hd-idle" - start-stop-daemon --stop --quiet --oknodo --exec $DAEMON - log_end_msg $? - ;; - - restart|force-reload) - $0 stop && sleep 2 && $0 start - ;; - - *) - echo "Usage: /etc/init.d/hd-idle start/stop/restart/force-reload" - exit 1 - ;; -esac diff --git a/aur/hd-idle/src/hd-idle.init b/aur/hd-idle/src/hd-idle.init deleted file mode 120000 index 39529ac47..000000000 --- a/aur/hd-idle/src/hd-idle.init +++ /dev/null @@ -1 +0,0 @@ -/build/plugapps/community/hd-idle/hd-idle.init \ No newline at end of file diff --git a/aur/p910nd/PKGBUILD b/aur/p910nd/PKGBUILD new file mode 100644 index 000000000..65dc15d62 --- /dev/null +++ b/aur/p910nd/PKGBUILD @@ -0,0 +1,25 @@ +# Contributor: G_Syme +pkgname=p910nd +pkgver=0.93 +pkgrel=1 +pkgdesc="A small printer daemon intended for diskless workstations that passes jobs directly to the printer" +arch=('i686' 'x86_64') +url="http://p910nd.sourceforge.net" +license=('GPL2') +backup=('etc/conf.d/p910nd') +options=('emptydirs') +source=(http://downloads.sf.net/$pkgname/$pkgname-$pkgver.tar.bz2 \ + $pkgname.init) +md5sums=('f668eace7f424953c3aa48afcb34c62b' + 'e44be17ad714c366300289cb8aaa3f3a') + +build() { + cd $srcdir/$pkgname-$pkgver +# sed -e 's|/etc/sysconfig|/etc/conf.d|g' -i $pkgname.init || return 1 + sed -e "s|/var/lock/subsys|/var/lock/$pkgname|" -i $pkgname.c || return 1 + make CONFIGDIR=/etc/conf.d SCRIPTDIR=/etc/rc.d || return 1 + make CONFIGDIR=/etc/conf.d SCRIPTDIR=/etc/rc.d DESTDIR=$pkgdir install || return 1 + install -m755 $srcdir/$pkgname.init $pkgdir/etc/rc.d/$pkgname || return 1 + install -d -m755 $pkgdir/var/lock/$pkgname + chmod 1777 $pkgdir/var/lock +} diff --git a/aur/p910nd/p910nd.init b/aur/p910nd/p910nd.init new file mode 100644 index 000000000..8be41b607 --- /dev/null +++ b/aur/p910nd/p910nd.init @@ -0,0 +1,38 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/p910nd + +PID=`pidof -o %PPID /usr/sbin/p910nd` +case "$1" in + start) + stat_busy "Starting P910N Daemon" + [ -z "$PID" ] && /usr/sbin/p910nd $P910ND_OPTS $P910ND_NUM &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon p910nd + stat_done + fi + ;; + stop) + stat_busy "Stopping P910N Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon p910nd + stat_done + fi + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 +# vim: ft=sh ts=2 sw=2 diff --git a/aur/wxbase/PKGBUILD b/aur/wxbase/PKGBUILD new file mode 100644 index 000000000..5bfeb5da3 --- /dev/null +++ b/aur/wxbase/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: halim + +pkgname=wxbase +pkgver=2.8.11 +pkgrel=2 +pkgdesc="wxBase - wxWidgets base libraries for no X install" +arch=('i686' 'x86_64') +url="http://wxwidgets.org" +license=('custom:wxWindows') +depends=('zlib') +conflicts=('wxgtk') +makedepends=('') +source=(http://downloads.sourceforge.net/wxwindows/wxGTK-${pkgver}.tar.bz2) +md5sums=('6040933d200037f90f6aa1c5169e7ec6') +build() { + cd ${srcdir}/wxGTK-${pkgver} + +./configure --prefix=/usr --libdir=/usr/lib \ +--disable-gui --disable-debug --enable-unicode --disable-compat24 \ +--disable-compat26 --with-zlib=sys --without-odbc \ +--without-expat --without-libmspack --without-subdirs || return 1 + +make CC="gcc" || return 1 +make DESTDIR=${pkgdir} install || return 1 + +cd docs || return 1 +install -D -m644 licence.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1 +} diff --git a/uboot-iconnect/PKGBUILD b/uboot-iconnect/PKGBUILD deleted file mode 100644 index f78eb902e..000000000 --- a/uboot-iconnect/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Maintainer: Mike Staszel - -pkgname=u-boot-iconnect -pkgver=2010.11 -pkgrel=1 -pkgdesc="u-Boot for the iConnect" -arch=('arm') -url="ftp://ftp.denx.de/pub/u-boot/" -license=('GPL') -source=(http://plugapps.com/os/iconnect/uboot/$pkgname-$pkgver.tar.gz - iconnect.patch -) -md5sums=('d597f7d5ac6ea41f49e667dd08f08a34' - 'c4a24f13c3693eb59250d791efad3320') -LDFLAGS="" - -build() { - cd $srcdir/u-boot - patch -p1 -i $srcdir/iconnect.patch || return 1 - - make iconnect_config || return 1 - make u-boot.kwb || return 1 -# echo "Building u-boot.bin.pagesize" -# # Slow but does the trick -# bytes=$(stat --format='%s' u-boot.bin) -# fillbytes=$[262144-$bytes] -# cp u-boot.bin u-boot.bin.pagesize -# while [ $fillbytes -ne 0 ]; do -# printf "\xff" >>u-boot.bin.pagesize -# fillbytes=$[$fillbytes-1] -# done -} diff --git a/uboot-iconnect/iconnect.patch b/uboot-iconnect/iconnect.patch deleted file mode 100644 index 251361a8b..000000000 --- a/uboot-iconnect/iconnect.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/boards.cfg 2010-11-07 21:03:05.000000000 -0600 -+++ b/boards.cfg 2010-11-07 21:11:49.000000000 -0600 -@@ -376,6 +376,7 @@ - mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood - openrd_base arm arm926ejs - Marvell kirkwood - sheevaplug arm arm926ejs - Marvell kirkwood -+iconnect arm arm926ejs - Marvell kirkwood - imx27lite arm arm926ejs imx27lite logicpd mx27 - magnesium arm arm926ejs imx27lite logicpd mx27 - omap5912osk arm arm926ejs - ti omap