Date: Thu, 18 Dec 2003 22:42:36 +0100
From: Haakon Riiser <haakon.riiser@fys.uio.no>
To: sensors@Stimpy.netroedge.com
Subject: lm_sensors 2.8.2 / DESTDIR / root
The reason for this email is that I always try to avoid running
Makefiles as root, even during 'make install'. Therefore, I
always use the DESTDIR feature, when it's available. Until today,
I always built i2c and lm_sensors by doing
$ make
$ make -i install DESTDIR=/foo
$ cd /foo && su root && fix permissions/ownership && install
The -i flag to make install is a kludge to avoid having to be root
while installing to the DESTDIR, and it's only required because
the files are installed with "-o root -g root". Using the -i
flag is of course not a good idea, since more fatal errors can
easily fly by undetected.
Today, I upgraded to Linux 2.6.0, and tried a similar install
procedure for lm_sensors, except that the make target is now "user"
and the install target is "user_install". I now noticed that the
DESTDIR variable is not used everywhere in "user_install", so I
couldn't use the -i kludge anymore. Instead, I wrote a patch that
removes the "-o root -g root" arguments to install everywhere, and
I also tried to add DESTDIR to all files/directories installed.
(The patch only applies to lm_sensors, not i2c, since only
lm_sensors is required in Linux 2.6.0.)
There's really no reason to say -o root -g root anyway, since if you
do install directly with make install, you have to be logged in as
root, and then the files will get the right ownership by default.
Much of the point of installing to a temporary DESTDIR is that you
don't have to be root, and that you can prepare the installation
by hand. Fixing the ownership is trivial:
chown -R root.root $DESTDIR
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2189 7894878c-1315-0410-8ee3-d5d059ff63e0
Copy sysctl enums to chip drivers from sensors.h for now,
as seen in drivers included in 2.5 tree. File no longer included
from kernel side.
Apply i2c-proc change in CVS tagged -km2.
Partial clean and sort of includes everywhere.
Add i2c-dev.h, as a partial copy from i2c.
Add to sensors.h from i2c-proc.h to compile things.
Remove i2c-isa.h.
Reflect header file changes to lib/ and prog/.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1705 7894878c-1315-0410-8ee3-d5d059ff63e0
Leave the files there for now.
Remove old installed sensors.o in kernel/Module.mk.
sensors.c was moved to i2c-proc.c in the i2c package.
i2c-isa.h was appended to i2c.h in the i2c package.
Delete all but the SYSCTL and ALARMS definitions in sensors.h,
as the rest of the file was moved to i2c-proc.h in the i2c package.
Remove #include "i2c-isa.h" lines in all chip drivers and
in bus driver i2c-isa.c.
This all probably breaks mkpatch.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1015 7894878c-1315-0410-8ee3-d5d059ff63e0
Set DESTDIR if you want to install at some other place then where you
will run everything from.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@675 7894878c-1315-0410-8ee3-d5d059ff63e0
* Removed several superfluous (struct i2c_client *) casts (they were left
from the time we had separate structs for smbus and isa)
* Removed the internal lists of registered clients
They have not been used for quite some time now, took memory space,
and limited the maximum number of clients that could be registered.
Also removed two small Makefile errors - I am happy I caught them before
the next release!
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@582 7894878c-1315-0410-8ee3-d5d059ff63e0
The Makefile now examine $(LINUX)/.config to see what modules need to be
compiled. It compiles only those modules which were either not configured
in at all, or were built as modules (ie. drivers which are built-in in the
kernel are not built, as they can not be overruled).
The above is still potentially dangerous, if we break the interface of
our modules. Still, it is much better than it was.
C
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@575 7894878c-1315-0410-8ee3-d5d059ff63e0
* The i2c package can no longer be compiled as part of the lm_sensors tree
* The archive of the i2c package is removed
* smbus, i2c-dev and i2c-proc modules and headers have been removed; they
are now completely integrated into the i2c package
* The fake i2c.h header has been removed; this also allowed us to remove
the ugly LM_SENSORS and TBD defines.
* A new variable I2C_HEADERS is introduced in the Makefile. This allows
us to install the i2c headers in, for example, /usr/local/include/linux.
* All files now include <linux/i2c.h> instead of "i2c.h" and "smbus.h"
Status: 'make dep' works, all the right include files are found. 'make all'
does not yet work.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@496 7894878c-1315-0410-8ee3-d5d059ff63e0
Until now, all installed include files depended on a #defined variable
LM_SENSORS: if it was defined, other files were included as "somefile.h"
instead of <linux/somefile.h>. This was clearly dangerous, and is fixed
now, by automatically deleting the offending lines from the include file
when it is installed.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@180 7894878c-1315-0410-8ee3-d5d059ff63e0