[opensuse-packaging] moving a file and deleting a directory
Hello, In my spec file I have to move and delete a directory. Currently in the %files section I have this: # move 50_cricket.conf to an Apache2 location mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d /bin/mv -v /etc/httpd/conf.d/50_cricket.conf %{buildroot}%{apache_sysconfdir}/conf.d/50_cricket.conf # remove directory /bin/rmdir /etc/httpd/conf.d The errors I get are these. error: File must begin with "/": mkdir error: File must begin with "/": -p error: Two files on one line: /bin/mv error: File must begin with "/": -v error: Two files on one line: /bin/mv error: Two files on one line: /etc/httpd/conf.d/50_cricket.conf error: Two files on one line: /bin/rmdir Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.5DiDlO + umask 022 + cd /usr/src/packages/BUILD + cd cricket-1.0.5 + DOCDIR=/usr/src/packages/BUILDROOT/cricket-1.0.5-16.1.x86_64/usr/share/doc/packages/cricket + export DOCDIR + rm -rf /usr/src/packages/BUILDROOT/cricket-1.0.5-16.1.x86_64/usr/share/doc/packages/cricket + /bin/mkdir -p /usr/src/packages/BUILDROOT/cricket-1.0.5-16.1.x86_64/usr/share/doc/packages/cricket + cp -pr CHANGES COPYING DEV-INFO README THANKS TODO VERSION doc sample-config /usr/src/packages/BUILDROOT/cricket-1.0.5-16.1.x86_64/usr/share/doc/packages/cricket + exit 0 RPM build errors: File must begin with "/": mkdir File must begin with "/": -p Two files on one line: /bin/mv File must begin with "/": -v Two files on one line: /bin/mv Two files on one line: /etc/httpd/conf.d/50_cricket.conf Two files on one line: /bin/rmdir System halted. Question: How should these lines be formatted so they work ? Originally I wanted to resolve these errors belownbut I've missed something in the lines I added. { cricket: "/etc/httpd/conf.d/50_cricket.conf" is not allowed anymore in SuSE Linux. cricket-1.0.5-14.1.x86_64.rpm: directories not owned by a package: - /etc/httpd - /etc/httpd/conf.d System halted. } # make directory and move 50_cricket.conf to the Apache2 location mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d /bin/mv -v /etc/httpd/conf.d/50_cricket.conf %{buildroot}%{apache_sysconfdir}/conf.d/50_cricket.conf # remove directory /bin/rmdir /etc/httpd/conf.d other ===== cricket.spec https://build.opensuse.org/package/edit_file?file=cricket.spec&package=cricket-6.0.el5.rf&project=home%3Adoiggl Last log https://build.opensuse.org/package/live_build_log?arch=x86_64&package=cricket-6.0.el5.rf&project=home%3Adoiggl&repository=openSUSE_Factory Project https://build.opensuse.org/package/show?package=cricket-6.0.el5.rf&project=home%3Adoiggl Thanks Glenn -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
В сообщении от Суббота 19 сентября 2009 08:12:27 автор doiggl@velocitynet.com.au написал:
Currently in the %files section I have this:
# move 50_cricket.conf to an Apache2 location mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d /bin/mv -v /etc/httpd/conf.d/50_cricket.conf %{buildroot}%{apache_sysconfdir}/conf.d/50_cricket.conf
# remove directory /bin/rmdir /etc/httpd/conf.d
Must be in %install section. -- WBR, Kyrill Detinov
participants (2)
-
doiggl@velocitynet.com.au
-
Kyrill Detinov