In an effort to learn how the new PkgWrangler works, I've been working through the anaconda review. Here are fixes for that along with some other things:
1) systemd and udev stuff installing to /usr/lib rather than /lib. I can't use the %{_libdir} macro because the 64-bit platforms give us /usr/lib64, so I went with %{_prefix}/lib. If there is a special macro I should be using here, let me know.
2) Drop newt-devel and slang-devel BuildRequires. Loader is gone, we don't need these anymore.
Specifically: anaconda.src:183: W: unversioned-explicit-obsoletes booty anaconda.src:262: E: hardcoded-library-path in /lib/systemd/system/* anaconda.src:263: E: hardcoded-library-path in /lib/systemd/system-generators/* anaconda.src:287: E: files-attr-not-set anaconda.src:288: E: files-attr-not-set anaconda.src:289: E: files-attr-not-set anaconda.src:290: E: files-attr-not-set anaconda.src:293: E: files-attr-not-set anaconda.src:294: E: files-attr-not-set anaconda.src:295: E: files-attr-not-set anaconda.src:296: E: files-attr-not-set anaconda.src:299: E: hardcoded-library-path in /usr/lib/dracut/modules.d/80%{name} anaconda.src:299: E: files-attr-not-set anaconda.src:300: E: hardcoded-library-path in /usr/lib/dracut/modules.d/80%{name}/* anaconda.src:300: E: files-attr-not-set anaconda.src:624: W: macro-in-%changelog %packages anaconda.src:1234: W: macro-in-%changelog %include anaconda.src:1680: W: macro-in-%changelog %{nil} anaconda.src:1733: W: macro-in-%changelog %post anaconda.src:2160: W: macro-in-%changelog %{nil} anaconda.src:2325: W: macro-in-%changelog %includes anaconda.src:2564: W: macro-in-%changelog %packages anaconda.src:2565: W: macro-in-%changelog %post anaconda.src:2592: W: macro-in-%changelog %pre anaconda.src:2788: W: macro-in-%changelog %pre
Updated data/ and data/systemd/ to install to /usr/lib rather than /lib since the UsrMove thing happened.
Removed the newt and slang BuildRequires since we do not use those anymore. --- anaconda.spec.in | 51 ++++++++++++++++++++++++--------------------- configure.ac | 8 ------- data/Makefile.am | 2 +- data/systemd/Makefile.am | 4 +- 4 files changed, 30 insertions(+), 35 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in index a598c59..805433b 100644 --- a/anaconda.spec.in +++ b/anaconda.spec.in @@ -28,7 +28,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %define libselinuxver 1.6 %define pykickstartver 1.99.22 %define rpmpythonver 4.2-0.61 -%define slangver 2.0.6-2 %define yumver 3.4.3-32 %define partedver 1.8.1 %define pypartedver 2.5-2 @@ -45,6 +44,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %define libblkidver 2.17.1-1 %define fcoeutilsver 1.0.12-3.20100323git %define firewalldver 0.2.9-1 +%define pythonurlgrabberver 3.9.1-5 +%define utillinuxver 2.15.1 +%define syslinuxver 3.73
BuildRequires: audit-libs-devel BuildRequires: bzip2-devel @@ -70,16 +72,15 @@ BuildRequires: libselinux-devel >= %{libselinuxver} BuildRequires: libsepol-devel BuildRequires: libxklavier-devel BuildRequires: libxml2-python -BuildRequires: newt-devel BuildRequires: pango-devel BuildRequires: pykickstart >= %{pykickstartver} BuildRequires: python-devel BuildRequires: python-pyblock >= %{pythonpyblockver} -BuildRequires: python-urlgrabber >= 3.9.1-5 +BuildRequires: python-urlgrabber >= %{pythonurlgrabberver} BuildRequires: python-nose BuildRequires: rpm-devel BuildRequires: rpm-python >= %{rpmpythonver} -BuildRequires: slang-devel >= %{slangver} +BuildRequires: systemd BuildRequires: xmlto BuildRequires: yum >= %{yumver} BuildRequires: zlib-devel @@ -104,7 +105,7 @@ Requires: parted >= %{partedver} Requires: pyparted >= %{pypartedver} Requires: yum >= %{yumver} Requires: libxml2-python -Requires: python-urlgrabber >= 3.9.1-5 +Requires: python-urlgrabber >= %{pythonurlgrabberver} Requires: system-logos Requires: pykickstart >= %{pykickstartver} Requires: device-mapper >= %{dmver} @@ -119,14 +120,13 @@ Requires: dmidecode %endif Requires: python-pyblock >= %{pythonpyblockver} Requires: libuser-python -Requires: newt-python Requires: authconfig Requires: firewalld >= %{firewalldver} Requires: cryptsetup-luks Requires: python-cryptsetup >= %{pythoncryptsetupver} Requires: mdadm Requires: lvm2 -Requires: util-linux >= 2.15.1 +Requires: util-linux >= %{utillinuxver} Requires: dbus-python Requires: python-pwquality Requires: python-bugzilla @@ -147,7 +147,7 @@ Requires: hfsplus-tools Requires: genisoimage >= %{genisoimagever} Requires: GConf2 >= %{gconfversion} %ifarch %{ix86} x86_64 -Requires: syslinux >= 3.73 +Requires: syslinux >= %{syslinuxver} Requires: makebootfat Requires: device-mapper %endif @@ -177,7 +177,7 @@ Obsoletes: anaconda-images <= 10 Provides: anaconda-images = %{version}-%{release} Obsoletes: anaconda-runtime < %{version}-%{release} Provides: anaconda-runtime = %{version}-%{release} -Obsoletes: booty +Obsoletes: booty <= 0.107-1
%description The anaconda package contains the program which was used to install your @@ -256,9 +256,9 @@ update-desktop-database &> /dev/null || : %doc docs/command-line.txt %doc docs/install-methods.txt %doc docs/mediacheck.txt -/lib/systemd/system/* -/lib/systemd/system-generators/* -/lib/udev/rules.d/70-anaconda.rules +%{_unitdir}/* +%{_prefix}/lib/systemd/system-generators/* +%{_prefix}/lib/udev/rules.d/70-anaconda.rules %{_bindir}/instperf %{_sbindir}/anaconda %{_sbindir}/handle-sshpw @@ -281,20 +281,23 @@ update-desktop-database &> /dev/null || : %endif
%files widgets +%defattr(-,root,root) %{_libdir}/libAnacondaWidgets.so.* %{_libdir}/girepository*/AnacondaWidgets*typelib %{_libdir}/python*/site-packages/gi/overrides/* %{_datadir}/anaconda/tzmapdata/*
%files widgets-devel +%defattr(-,root,root) %{_libdir}/libAnacondaWidgets.so %{_includedir}/* %{_datadir}/glade/catalogs/AnacondaWidgets.xml %{_datadir}/gtk-doc
%files dracut -%dir /usr/lib/dracut/modules.d/80%{name} -/usr/lib/dracut/modules.d/80%{name}/* +%defattr(-,root,root) +%dir %{_prefix}/lib/dracut/modules.d/80%{name} +%{_prefix}/lib/dracut/modules.d/80%{name}/*
%changelog * Mon Nov 26 2012 Brian C. Lane bcl@redhat.com - 18.31-1 @@ -681,7 +684,7 @@ update-desktop-database &> /dev/null || : - Yet more TODO list updates. (clumens) - Don't display "None" in the name of a root. (clumens) - Fix configuration of protected wireless connections (#855526) (rvykydal) -- Fix graphical kickstart with %packages data (jkeating) +- Fix graphical kickstart with %%packages data (jkeating) - Add password validation to text password spoke (jkeating) - Make use of the validatePassword routine from users.py (jkeating) - Add a password verification method to users.py (jkeating) @@ -1291,7 +1294,7 @@ update-desktop-database &> /dev/null || :
* Mon Aug 13 2012 Chris Lumens clumens@redhat.com - 18.4-1 - dracut: fix inst.ks.sendmac (#826657) (wwoods) -- dracut: suppress ks errors from missing %include (wwoods) +- dracut: suppress ks errors from missing %%include (wwoods) - dracut: add comment to run_kickstart() (wwoods) - Remove unused writeKS methods. (clumens) - Only show unused devices that haven't been removed/deleted. (dlehman) @@ -1737,7 +1740,7 @@ update-desktop-database &> /dev/null || : - Do not reactivate network device needlessly on s390 (#739846) (rvykydal) - Start NM in loader on s390 until we have systemd init here too (#733680) (rvykydal) -- Revert "Set debug_package to %{nil} so we don't strip our binaries." +- Revert "Set debug_package to %%{nil} so we don't strip our binaries." (akozumpl) - Fix createUser and createGroup to work with kickstart defaults (#739428) (bcl) @@ -1790,7 +1793,7 @@ update-desktop-database &> /dev/null || : - ut: cleanup after firewall_test.py (akozumpl) - ut: move tests/fw_test.py to tests/pyanaconda_test/firewall_test.py (akozumpl) -- Close out the yum history before running %post scripts (#730857). (clumens) +- Close out the yum history before running %%post scripts (#730857). (clumens) - Remove unused attribute 'bootable' from DeviceFormat classes. (dlehman) - Allow btrfs stage2 with grub2. (#732594) (dlehman) - Clean up return values of GRUB2._gpt_disk_has_bios_boot. (dlehman) @@ -2217,7 +2220,7 @@ update-desktop-database &> /dev/null || : * Mon Mar 28 2011 Chris Lumens clumens@redhat.com - 16.3-1 - Use a more general EnvironmentError to catch timezone-file errors. (akozumpl) - Add shell command to upd-bootiso (bcl) -- Set debug_package to %{nil} so we don't strip our binaries. (pjones) +- Set debug_package to %%{nil} so we don't strip our binaries. (pjones) - Return values, not strings (bcl) - Use proper store types for DataComboBoxes. (akozumpl) - Fixup rindex usage (#678086) (bcl) @@ -2382,7 +2385,7 @@ update-desktop-database &> /dev/null || : - Fix loading translations in loader (#677648). (clumens) - Don't always attempt to load updates on kickstart installs (#677131). (clumens) - s390x has firstboot now (dcantrell) -- Don't fail on missing %includes during loader kickstart processing (#676940). (clumens) +- Don't fail on missing %%includes during loader kickstart processing (#676940). (clumens) - Prompt for media check on DVD installs (#676551). (clumens) - Tighten the focus of the dogtail and X try/except blocks. (dlehman) - Stop overriding ext[234] filesystem defaults. (dlehman) @@ -2621,8 +2624,8 @@ update-desktop-database &> /dev/null || : - There's no need to pass exclusiveDisks to doPartitioning separately. (dlehman) - Move storage device scanning parameters into a separate class. (dlehman) -- Don't ignore %packages if --default is given (#621349, dcantrell). (clumens) -- Don't traceback when displaying %post error messages (#654074). (clumens) +- Don't ignore %%packages if --default is given (#621349, dcantrell). (clumens) +- Don't traceback when displaying %%post error messages (#654074). (clumens) - Display a warning message on TAINT_HARDWARE_UNSUPPORTED (#623140). (clumens) - If getting .treeinfo fails, try treeinfo (#635065). (clumens) - instPath -> rootPath (clumens) @@ -2649,7 +2652,7 @@ update-desktop-database &> /dev/null || : - Remove writeRpmPlatform, adjust callers. (#651132, #650490) (notting) - Import as "pyanaconda.anaconda_log", not "anaconda_log". (clumens) - A little too much got deleted from imount.c. (clumens) -- Remove the popping portion of kickstart %pre script notification. (clumens) +- Remove the popping portion of kickstart %%pre script notification. (clumens) - Add pyanaconda/.libs to the PYTHONPATH for pylint. (clumens) - Ignore several false positives and import errors while running pylint. (clumens) @@ -2845,7 +2848,7 @@ update-desktop-database &> /dev/null || : - gui: hide text in the proxy password field (#611825). (akozumpl) - logging: be smarter logging UI module import errors. (akozumpl) - text.messageWindow(): make it more resilient to the input. (akozumpl) -- Log that we are running %pre scripts to the console (#640256). (clumens) +- Log that we are running %%pre scripts to the console (#640256). (clumens) - Preset default config for immediate Close in nm-c-e enablement (#636526) (rvykydal) - Fix non-dhcp network enablement in stage 2 (#640951) (rvykydal) diff --git a/configure.ac b/configure.ac index 6233303..e8e2cef 100644 --- a/configure.ac +++ b/configure.ac @@ -61,14 +61,6 @@ AC_CHECK_LIB([iscsi], [libiscsi_get_firmware_network_config], [AC_SUBST(ISCSI_LIBS, [-liscsi])], [AC_MSG_FAILURE([*** libiscsi not usable.])])
-AC_CHECK_LIB([newt], [newtInit], - [AC_SUBST(NEWT_LIBS, [-lnewt])], - [AC_MSG_FAILURE([*** libnewt not usable.])]) - -AC_CHECK_LIB([slang], [SLang_get_int_size], - [AC_SUBST(SLANG_LIBS, [-lslang])], - [AC_MSG_FAILURE([*** libslang not usable.])]) - AC_CHECK_LIB([z], [zlibVersion], [AC_SUBST(ZLIB_LIBS, [-lz])], [AC_MSG_FAILURE([*** libz not usable.])]) diff --git a/data/Makefile.am b/data/Makefile.am index 9c8db46..95156e2 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -24,7 +24,7 @@ CLEANFILES = *~ ksdir = $(datadir)/$(PACKAGE_NAME) dist_ks_DATA = interactive-defaults.ks
-udevdir = /lib/udev/rules.d +udevdir = $(prefix)/lib/udev/rules.d dist_udev_DATA = 70-anaconda.rules
tmuxdir = $(datadir)/$(PACKAGE_NAME) diff --git a/data/systemd/Makefile.am b/data/systemd/Makefile.am index 7edc212..a0bcbfd 100644 --- a/data/systemd/Makefile.am +++ b/data/systemd/Makefile.am @@ -17,8 +17,8 @@ # # Author: Chris Lumens clumens@redhat.com
-systemddir = /lib/systemd/system -generatordir = /lib/systemd/system-generators +systemddir = $(prefix)/lib/systemd/system +generatordir = $(prefix)/lib/systemd/system-generators
dist_systemd_DATA = anaconda.service \ anaconda-direct.service \
On Thu, Nov 29, 2012 at 01:32:05PM -0500, David Cantrell wrote: Ack.
Looks like makebumpver should be escaping % in the changelog entries.
On Thu, Nov 29, 2012 at 02:54:42PM -0800, Brian C. Lane wrote:
On Thu, Nov 29, 2012 at 01:32:05PM -0500, David Cantrell wrote: Ack.
Looks like makebumpver should be escaping % in the changelog entries.
Here's a patch for that:
commit 5710b9abef4ca835382c1c5d9bf79bb9c13c4472 Author: David Cantrell dcantrell@redhat.com Date: Fri Nov 30 10:38:22 2012 -0500
Escape single percent signs in RPM changelog entries.
makebumpver needs to make sure that single percent signs (%) are escaped in RPM changelog lines. Leaving single percent signs in the changelog entries causes problems for rpmlint and, theoretically, rpmbuild.
diff --git a/scripts/makebumpver b/scripts/makebumpver index 9fe577c..a075e87 100755 --- a/scripts/makebumpver +++ b/scripts/makebumpver @@ -348,6 +348,7 @@ class MakeBumpVer: newVersion, self.release))
for msg, rhbz in rpmlog: + msg = re.sub('(?<!%)%%(?!%)|(?<!%%)%(?!%%)', '%%', msg) sublines = textwrap.wrap(msg, 77) f.write("- %s\n" % sublines[0])
I've tested this regexp on a number of different test strings, primarily to make sure it preserves already escaped percent signs if those should show up in git commit log messages. I'd say it works for about 95% of strings we'll encounter. It chokes on seven consecutive percent signs, but...meh? It escapes single percent signs, ignores doubles, changes 3 to 4, and the other likely scenarios we'll need to account for.
On Fri, Nov 30, 2012 at 10:42:07AM -0500, David Cantrell wrote:
On Thu, Nov 29, 2012 at 02:54:42PM -0800, Brian C. Lane wrote:
On Thu, Nov 29, 2012 at 01:32:05PM -0500, David Cantrell wrote: Ack.
Looks like makebumpver should be escaping % in the changelog entries.
Here's a patch for that:
That is some regex. Tested it with a few strings of my own, and it looks all right. Ack.
Samantha
On Thu, Nov 29, 2012 at 01:32:04PM -0500, David Cantrell wrote:
In an effort to learn how the new PkgWrangler works, I've been working through the anaconda review. Here are fixes for that along with some other things:
- systemd and udev stuff installing to /usr/lib rather than /lib. I can't use the %{_libdir} macro because the 64-bit platforms give us /usr/lib64, so I went with %{_prefix}/lib. If there is a special macro I should be using here, let me know.
There is the %{_lib} macro which just expands to (you guessed it!) lib, so %{_prefix}/%{_lib} ....if you really and truly have your heart set on using macros wherever possible at least.
Samantha
Samantha N. Bueno píše v Čt 29. 11. 2012 v 14:03 -0500:
On Thu, Nov 29, 2012 at 01:32:04PM -0500, David Cantrell wrote:
In an effort to learn how the new PkgWrangler works, I've been working through the anaconda review. Here are fixes for that along with some other things:
- systemd and udev stuff installing to /usr/lib rather than /lib. I can't use the %{_libdir} macro because the 64-bit platforms give us /usr/lib64, so I went with %{_prefix}/lib. If there is a special macro I should be using here, let me know.
There is the %{_lib} macro which just expands to (you guessed it!) lib, so %{_prefix}/%{_lib} ....if you really and truly have your heart set on using macros wherever possible at least.
no, %{_lib} expands to lib or lib64
Dan
anaconda-patches@lists.fedorahosted.org