From: Tim S. <ts...@do...> - 2003-01-09 20:28:16
|
Note: Patch against release code 5.0.49 Purpose: To be applied in RPM spec file, to allow the RPM to be built as non root user (ie don't try chown). Why? Useful on NFS hosted source trees, where being root doesn't work well. Also good practice not to have to be root to build software packages. It's a bit trivial really - but I had it so I though I may as well send it here :-) Best wishes Tim Southerwood ******************* CUT HERE ********************************* diff -Naur smartmontools-5.0-49.orig/Makefile smartmontools-5.0-49/Makefile --- smartmontools-5.0-49.orig/Makefile Fri Dec 6 09:30:51 2002 +++ smartmontools-5.0-49/Makefile Tue Jan 7 17:04:22 2003 @@ -95,21 +95,21 @@ /bin/gzip -c smartd.conf.5 > smartd.conf.5.gz rm -f $(DESTDIR)/usr/share/man/man8/smartctl.8 rm -f $(DESTDIR)/usr/share/man/man8/smartd.8 - install -m 755 -o root -g root -D smartctl $(DESTDIR)/usr/sbin/smartctl - install -m 755 -o root -g root -D smartd $(DESTDIR)/usr/sbin/smartd - install -m 755 -o root -g root -D smartd.initd $(DESTDIR)/etc/rc.d/init.d/smartd - install -m 644 -o root -g root -D smartctl.8.gz $(DESTDIR)/usr/share/man/man8/smartctl.8.gz - install -m 644 -o root -g root -D smartd.8.gz $(DESTDIR)/usr/share/man/man8/smartd.8.gz - install -m 644 -o root -g root -D smartd.conf.5.gz $(DESTDIR)/usr/share/man/man5/smartd.conf.5.gz - install -m 644 -o root -g root -D CHANGELOG $(DESTDIR)/usr/share/doc/smartmontools-5.0/CHANGELOG - install -m 644 -o root -g root -D COPYING $(DESTDIR)/usr/share/doc/smartmontools-5.0/COPYING - install -m 644 -o root -g root -D README $(DESTDIR)/usr/share/doc/smartmontools-5.0/README - install -m 644 -o root -g root -D TODO $(DESTDIR)/usr/share/doc/smartmontools-5.0/TODO - install -m 644 -o root -g root -D VERSION $(DESTDIR)/usr/share/doc/smartmontools-5.0/VERSION - install -m 644 -o root -g root -D WARNINGS $(DESTDIR)/usr/share/doc/smartmontools-5.0/WARNINGS - install -m 644 -o root -g root -D smartd.conf $(DESTDIR)/usr/share/doc/smartmontools-5.0/smartd.conf - install -m 644 -o root -g root -D smartd.conf $(DESTDIR)/etc/smartd.conf.example - if [ ! -f $(DESTDIR)/etc/smartd.conf ] ; then install -m 644 -o root -g root -D smartd.conf $(DESTDIR)/etc/smartd.conf ; fi + install -m 755 -D smartctl $(DESTDIR)/usr/sbin/smartctl + install -m 755 -D smartd $(DESTDIR)/usr/sbin/smartd + install -m 755 -D smartd.initd $(DESTDIR)/etc/rc.d/init.d/smartd + install -m 644 -D smartctl.8.gz $(DESTDIR)/usr/share/man/man8/smartctl.8.gz + install -m 644 -D smartd.8.gz $(DESTDIR)/usr/share/man/man8/smartd.8.gz + install -m 644 -D smartd.conf.5.gz $(DESTDIR)/usr/share/man/man5/smartd.conf.5.gz + install -m 644 -D CHANGELOG $(DESTDIR)/usr/share/doc/smartmontools-5.0/CHANGELOG + install -m 644 -D COPYING $(DESTDIR)/usr/share/doc/smartmontools-5.0/COPYING + install -m 644 -D README $(DESTDIR)/usr/share/doc/smartmontools-5.0/README + install -m 644 -D TODO $(DESTDIR)/usr/share/doc/smartmontools-5.0/TODO + install -m 644 -D VERSION $(DESTDIR)/usr/share/doc/smartmontools-5.0/VERSION + install -m 644 -D WARNINGS $(DESTDIR)/usr/share/doc/smartmontools-5.0/WARNINGS + install -m 644 -D smartd.conf $(DESTDIR)/usr/share/doc/smartmontools-5.0/smartd.conf + install -m 644 -D smartd.conf $(DESTDIR)/etc/smartd.conf.example + if [ ! -f $(DESTDIR)/etc/smartd.conf ] ; then install -m 644 -D smartd.conf $(DESTDIR)/etc/smartd.conf ; fi @echo -e "\n\nTo manually start smartd on bootup, run /etc/rc.d/init.d/smartd start" @echo "To automatically start smartd on bootup, run /sbin/chkconfig --add smartd" @echo -e "\n\nSmartd can now use a configuration file /etc/smartd.conf. Do:\nman 8 smartd\n." @@ -149,4 +149,4 @@ mv /usr/src/redhat/RPMS/i386/$(pkgname)*.rpm . mv /usr/src/redhat/SRPMS/$(pkgname)*rpm . rm -f /usr/src/redhat/SOURCES/$(pkgname).tar.gz - echo `hostname` | grep -q ballen && echo $(newcounter) > VERSION && chown ballen.ballen * + echo `hostname` | grep -q ballen && echo $(newcounter) > VERSION ******************* CUT HERE ********************************* -- Mr Tim J Southerwood CSG, Dept of Computing, Imperial College, London Email personal: ts...@di... work: ts...@do... Tel home: 020-866-17388 mobile: 07949-487179 work: 020-759-48392 |