-
Notifications
You must be signed in to change notification settings - Fork 11
/
microos-tools.spec
142 lines (112 loc) · 4.03 KB
/
microos-tools.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#
# spec file for package microos-tools
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{!?_distconfdir: %global _distconfdir %{_prefix}%{_sysconfdir}}
Name: microos-tools
Version: 4.0
Release: 0
Summary: Files and Scripts for openSUSE MicroOS
License: GPL-2.0-or-later
Group: Development/Tools/Other
URL: https://github.com/openSUSE/microos-tools
Source: microos-tools-%{version}.tar.xz
BuildRequires: automake
BuildRequires: distribution-release
BuildRequires: pkgconfig
BuildRequires: pkgconfig(dracut)
BuildRequires: pkgconfig(rpm)
BuildRequires: pkgconfig(systemd)
Requires: read-only-root-fs
Requires: selinux-autorelabel = %{version}
# for man-online
Requires: mandoc-bin
%description
Files, scripts and directories for openSUSE MicroOS.
%package -n selinux-autorelabel
Summary: Automatic SELinux relabelling during early boot
Requires: /usr/bin/findmnt
Requires: policycoreutils
%description -n selinux-autorelabel
This package contains a dracut module and systemd generator for relabelling
the system during early boot.
%package -n microos-devel-tools
Summary: Tools to develop MicroOS
%description -n microos-devel-tools
This package contains tools to make developing of MicroOS easier.
%prep
%autosetup -p1
%build
./autogen.sh
%configure
%make_build
%install
%make_install
%pre
%service_add_pre setup-systemd-proxy-env.service setup-systemd-proxy-env.path printenv.service
%preun
%service_del_preun setup-systemd-proxy-env.service setup-systemd-proxy-env.path printenv.service
%post
%service_add_post setup-systemd-proxy-env.service setup-systemd-proxy-env.path printenv.service
%postun
%service_del_postun setup-systemd-proxy-env.service setup-systemd-proxy-env.path printenv.service
%pre -n microos-devel-tools
%service_add_pre microos-ro.service
%post -n microos-devel-tools
%service_add_post microos-ro.service
%preun -n microos-devel-tools
%service_del_preun microos-ro.service
%postun -n microos-devel-tools
%service_del_postun microos-ro.service
%pre -n selinux-autorelabel
%service_add_pre systemd-tmpfiles-setup-sys.service
%post -n selinux-autorelabel
%{regenerate_initrd_post}
%service_add_post systemd-tmpfiles-setup-sys.service
%preun -n selinux-autorelabel
%service_del_preun systemd-tmpfiles-setup-sys.service
%postun -n selinux-autorelabel
%{regenerate_initrd_post}
%service_del_postun systemd-tmpfiles-setup-sys.service
%posttrans -n selinux-autorelabel
%{regenerate_initrd_posttrans}
%files
%dir %{_sysconfdir}/selinux
%config %{_sysconfdir}/selinux/fixfiles_exclude_dirs
%{_unitdir}/printenv.service
%{_unitdir}/setup-systemd-proxy-env.path
%{_unitdir}/setup-systemd-proxy-env.service
%dir %{_unitdir}/salt-minion.service.d
%{_unitdir}/salt-minion.service.d/TMPDIR.conf
%{_tmpfilesdir}/salt-minion-tmpdir.conf
%dir %{_distconfdir}/tukit.conf.d
%{_distconfdir}/tukit.conf.d/salt-tukit.conf
%{_sbindir}/setup-systemd-proxy-env
%{_bindir}/man-online
%{_distconfdir}/profile.d/man-online.sh
%files -n selinux-autorelabel
%license COPYING
%dir %{_prefix}/lib/dracut
%dir %{_prefix}/lib/dracut/modules.d
%{_prefix}/lib/dracut/modules.d/98selinux-microos
%{_systemdgeneratordir}/selinux-autorelabel-generator
%{_unitdir}/systemd-tmpfiles-setup-sys.service
%files -n microos-devel-tools
%{_unitdir}/microos-ro.service
%{_sbindir}/microos-ro
%{_sbindir}/microos-rw
%{_sbindir}/rpm-sortbysize
%{_sbindir}/rpmorphan
%{_sbindir}/sysext-add-debug
%changelog