Skip to content

Commit

Permalink
Merge pull request #509 from hellcp/master
Browse files Browse the repository at this point in the history
Add metadata into packages
  • Loading branch information
shundhammer committed Jun 3, 2019
2 parents c38e5b3 + 186929e commit fa208e6
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 78 deletions.
8 changes: 8 additions & 0 deletions package/autoyast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri May 31 12:26:24 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>

- Add metainfo (fate#319035)
- Revamp spec
- Replace GenericName with Comment
- 4.2.1

-------------------------------------------------------------------
Mon Apr 29 11:34:37 UTC 2019 - Ladislav Slezák <lslezak@suse.cz>

Expand Down
135 changes: 67 additions & 68 deletions package/autoyast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,28 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif

Name: autoyast2
Version: 4.2.0
Version: 4.2.1
Release: 0
Summary: YaST2 - Automated Installation
License: GPL-2.0-only
Group: System/YaST
Url: https://github.com/yast/yast-autoinstallation

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: autoyast2-%{version}.tar.bz2

Source1: autoyast_en_html.tar.bz2

BuildRequires: update-desktop-files
BuildRequires: yast2-devtools >= 3.1.15
BuildRequires: yast2-devtools >= 4.2.2
# control.rng
BuildRequires: yast2-installation-control
# xmllint
Expand All @@ -50,7 +53,6 @@ BuildRequires: yast2-slp
BuildRequires: yast2-country
# AutoinstIssues::NoProposal
BuildRequires: yast2-storage-ng >= 4.0.160

# %%{_unitdir} macro definition is in a separate package since 13.1
%if 0%{?suse_version} >= 1310
BuildRequires: systemd-rpm-macros
Expand All @@ -73,23 +75,20 @@ Requires: yast2-transfer >= 2.21.0
Requires: yast2-xml
# AutoinstIssues::NoProposal
Requires: yast2-storage-ng >= 4.0.160
Requires: yast2-ruby-bindings >= 1.0.0

Conflicts: yast2-installation < 3.1.166

Provides: yast2-config-autoinst
Provides: yast2-module-autoinst
Provides: yast2-lib-autoinst

Obsoletes: yast2-config-autoinst
Obsoletes: yast2-module-autoinst
Provides: yast2-lib-autoinst
Obsoletes: yast2-lib-autoinst

BuildArch: noarch

Requires: yast2-ruby-bindings >= 1.0.0

Summary: YaST2 - Automated Installation
License: GPL-2.0-only
Group: System/YaST

%description
This package is intended for management of the control files and the
AutoYaST2 configurations. This system should only be used by
Expand All @@ -101,10 +100,12 @@ This file contains YaST2-independent files needed to create
installation sources.

%package installation
Requires: yast2-ruby-bindings >= 1.0.0

Summary: YaST2 - Auto Installation Modules
Group: System/YaST

# Y2Storage::AutoinstIssues containing section information
BuildRequires: yast2-storage-ng >= 4.0.15

# API for Disabled Modules (ProductControl)
Requires: yast2 >= 2.16.36
# After API cleanup
Expand All @@ -124,8 +125,8 @@ Requires: yast2-update >= 3.3.0
Requires: yast2-xml
# "transact_by" key in PkgPropertiesAll()
Requires: yast2-pkg-bindings >= 4.0.7
# Y2Storage::AutoinstIssues containing section information
BuildRequires: yast2-storage-ng >= 4.0.15
Requires: yast2-ruby-bindings >= 1.0.0

Provides: yast2-trans-autoinst
Obsoletes: yast2-trans-autoinst

Expand All @@ -134,65 +135,64 @@ This package performs auto-installation relying on a control file
generated with the autoyast2 package.

%prep
%setup -n autoyast2-%{version}
%setup -q

%build
%yast_build

%install
%yast_install
%yast_metainfo

# Do not *blindly* remove the suse_update_desktop_file calls here. It is
# different from the code in the yast_install macro.
for d in $RPM_BUILD_ROOT/usr/share/autoinstall/modules/*.desktop ; do
for d in %{buildroot}%{_datadir}/autoinstall/modules/*.desktop ; do
%suse_update_desktop_file $d
done

# Class conf
install -d -m 700 $RPM_BUILD_ROOT/etc/autoinstall
install -d -m 700 %{buildroot}%{_sysconfdir}/autoinstall
# Installation files
install -d -m 700 $RPM_BUILD_ROOT/var/adm/autoinstall/scripts
install -d -m 700 $RPM_BUILD_ROOT/var/adm/autoinstall/init.d
install -d -m 700 $RPM_BUILD_ROOT/var/adm/autoinstall/logs
install -d -m 700 $RPM_BUILD_ROOT/var/adm/autoinstall/files
install -d -m 700 $RPM_BUILD_ROOT/var/adm/autoinstall/cache
install -d -m 700 %{buildroot}%{_localstatedir}/adm/autoinstall/scripts
install -d -m 700 %{buildroot}%{_localstatedir}/adm/autoinstall/init.d
install -d -m 700 %{buildroot}%{_localstatedir}/adm/autoinstall/logs
install -d -m 700 %{buildroot}%{_localstatedir}/adm/autoinstall/files
install -d -m 700 %{buildroot}%{_localstatedir}/adm/autoinstall/cache

# Repository
install -d $RPM_BUILD_ROOT/var/lib/autoinstall/repository
install -d $RPM_BUILD_ROOT/var/lib/autoinstall/repository/templates
install -d $RPM_BUILD_ROOT/var/lib/autoinstall/repository/rules
install -d $RPM_BUILD_ROOT/var/lib/autoinstall/repository/classes
install -d $RPM_BUILD_ROOT/var/lib/autoinstall/autoconf
install -d $RPM_BUILD_ROOT/var/lib/autoinstall/tmp
install -d %{buildroot}%{_localstatedir}/lib/autoinstall/repository
install -d %{buildroot}%{_localstatedir}/lib/autoinstall/repository/templates
install -d %{buildroot}%{_localstatedir}/lib/autoinstall/repository/rules
install -d %{buildroot}%{_localstatedir}/lib/autoinstall/repository/classes
install -d %{buildroot}%{_localstatedir}/lib/autoinstall/autoconf
install -d %{buildroot}%{_localstatedir}/lib/autoinstall/tmp

# Systemd Stuff
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}/
install -m 644 scripts/autoyast-initscripts.service $RPM_BUILD_ROOT/%{_unitdir}/
mkdir -p %{buildroot}%{_unitdir}/
install -m 644 scripts/autoyast-initscripts.service %{buildroot}%{_unitdir}/

# Documentation
install -d -m 755 $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html
tar xvpfC %{SOURCE1} $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html
mv $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html/autoyast/* $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html/
rmdir $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html/autoyast
install -d -m 755 %{buildroot}%{yast_docdir}/html
tar xvpfC %{SOURCE1} %{buildroot}%{yast_docdir}/html
mv %{buildroot}%{yast_docdir}/html/autoyast/* %{buildroot}%{yast_docdir}/html/
rmdir %{buildroot}%{yast_docdir}/html/autoyast

%post
%{fillup_only -n autoinstall}

%files
%defattr(-,root,root)
%dir /etc/autoinstall
%dir %{_sysconfdir}/autoinstall
%dir %{yast_yncludedir}/autoinstall
%dir /var/lib/autoinstall/repository
%dir /var/lib/autoinstall/repository/templates
%dir /var/lib/autoinstall/repository/rules
%dir /var/lib/autoinstall/repository/classes
%dir /var/lib/autoinstall/tmp
%doc %{_prefix}/share/doc/packages/autoyast2

%dir %yast_desktopdir
%{yast_desktopdir}/autoyast.desktop
%{yast_desktopdir}/clone_system.desktop
/usr/share/autoinstall/modules/*.desktop
%dir %{_localstatedir}/lib/autoinstall/repository
%dir %{_localstatedir}/lib/autoinstall/repository/templates
%dir %{_localstatedir}/lib/autoinstall/repository/rules
%dir %{_localstatedir}/lib/autoinstall/repository/classes
%dir %{_localstatedir}/lib/autoinstall/tmp
%doc %{yast_docdir}

%{yast_desktopdir}
%{yast_metainfodir}
%{_datadir}/autoinstall/modules/*.desktop
%dir %{yast_yncludedir}
%{yast_yncludedir}/autoinstall/classes.rb
%{yast_yncludedir}/autoinstall/conftree.rb
Expand Down Expand Up @@ -226,21 +226,20 @@ rmdir $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html/autoyast
%{_fillupdir}/sysconfig.autoinstall

%files installation
%defattr(-,root,root)
%dir %{yast_scrconfdir}
%{yast_scrconfdir}/autoinstall.scr
%{yast_scrconfdir}/cfg_autoinstall.scr
# DTD files
%dir /usr/share/autoinstall
#%dir /usr/share/autoinstall/dtd
%dir /usr/share/autoinstall/modules
#/usr/share/autoinstall/dtd/*
%dir %{_datadir}/autoinstall
#%dir %{_datadir}/autoinstall/dtd
%dir %{_datadir}/autoinstall/modules
#%{_datadir}/autoinstall/dtd/*

# systemd service file
%{_unitdir}/autoyast-initscripts.service

%dir /usr/share/autoinstall/xslt
/usr/share/autoinstall/xslt/merge.xslt
%dir %{_datadir}/autoinstall/xslt
%{_datadir}/autoinstall/xslt/merge.xslt
# config file

%dir %{yast_moduledir}
Expand Down Expand Up @@ -310,18 +309,18 @@ rmdir $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html/autoyast
%{yast_libdir}/autoinstall/autoinst_issues/*.rb

# scripts
%{_prefix}/lib/YaST2/bin/fetch_image.sh
%{_prefix}/lib/YaST2/bin/autoyast-initscripts.sh
%{yast_ybindir}/fetch_image.sh
%{yast_ybindir}/autoyast-initscripts.sh

%license COPYING

%dir /var/adm/autoinstall/
%dir /var/adm/autoinstall/scripts
%dir /var/adm/autoinstall/init.d
%dir /var/adm/autoinstall/logs
%dir /var/adm/autoinstall/files
%dir /var/adm/autoinstall/cache
%dir /var/lib/autoinstall
%dir /var/lib/autoinstall/autoconf
%dir %{_localstatedir}/adm/autoinstall/
%dir %{_localstatedir}/adm/autoinstall/scripts
%dir %{_localstatedir}/adm/autoinstall/init.d
%dir %{_localstatedir}/adm/autoinstall/logs
%dir %{_localstatedir}/adm/autoinstall/files
%dir %{_localstatedir}/adm/autoinstall/cache
%dir %{_localstatedir}/lib/autoinstall
%dir %{_localstatedir}/lib/autoinstall/autoconf

%changelog
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ ybin_SCRIPTS = \
bin/fetch_image.sh

desktop_DATA = \
desktop/autoyast.desktop \
desktop/clone_system.desktop
desktop/org.opensuse.yast.AutoYaST.desktop \
desktop/org.opensuse.yast.CloneSystem.desktop

fillup_DATA = \
fillup/sysconfig.autoinstall
Expand Down
2 changes: 1 addition & 1 deletion src/clients/files_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def main
# Change configuration (run AutoSequence)
elsif @func == "Change"
Wizard.CreateDialog
Wizard.SetDesktopIcon("autoyast2")
Wizard.SetDesktopIcon("org.opensuse.yast.AutoYaST")
@ret = CustomFileDialog()
Wizard.CloseDialog
elsif @func == "Packages"
Expand Down
2 changes: 1 addition & 1 deletion src/clients/scripts_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def main
AutoinstScripts.SetModified
elsif @func == "Change"
Wizard.CreateDialog
Wizard.SetDesktopIcon("autoyast")
Wizard.SetDesktopIcon("org.opensuse.yast.AutoYaST")
@ret = ScriptsDialog()
Wizard.CloseDialog
elsif @func == "Export"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ X-SuSE-YaST-Keywords=autoyast,installation
Icon=yast-autoyast
Exec=/usr/bin/xdg-su -c '/sbin/yast2 autoyast'

Name=Autoinstallation Configuration
GenericName=Configuration system for autoinstallation
Name=YaST Autoinstallation
GenericName=Autoinstallation Configuration
Comment=Configuration system for autoinstallation
StartupNotify=true
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ X-SuSE-YaST-Keywords=autoyast,installation,clone
Icon=yast-autoyast
Exec=/usr/bin/xdg-su -c '/sbin/yast2 clone_system'

Name=Autoinstallation Cloning System
GenericName=Creating AutoYaST configuration file
Name=YaST Clone System
GenericName=Autoinstallation Cloning System
Comment=Create an AutoYaST configuration file for cloning the system
StartupNotify=true
4 changes: 2 additions & 2 deletions src/include/autoinstall/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def initialize_autoinstall_dialogs(include_target)
# @return [Symbol]
def Settings
Wizard.CreateDialog
Wizard.SetDesktopIcon("autoyast")
Wizard.SetDesktopIcon("org.opensuse.yast.AutoYaST")
contents = HVSquash(
VBox(
VSquash(
Expand Down Expand Up @@ -215,7 +215,7 @@ def cloneSystem


Wizard.CreateDialog
Wizard.SetDesktopIcon("groups")
Wizard.SetDesktopIcon("org.opensuse.yast.CloneSystem")


# title
Expand Down

0 comments on commit fa208e6

Please sign in to comment.