Compare commits

..

173 commits

Author SHA1 Message Date
Jan Macku
c81f8b3540 10.27 2025-12-11 10:27:28 +01:00
Fedora Release Engineering
59989cdcf1 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 17:40:40 +00:00
Fedora Release Engineering
90e6e9e2ea Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 07:11:18 +00:00
Zbigniew Jędrzejewski-Szmek
100c0bd722 Rebuilt for the bin-sbin merge (2nd attempt)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2025-01-12 14:31:02 +01:00
Jan Macku
c8559fc150 10.26 2024-08-30 14:36:11 +02:00
Fedora Release Engineering
9b36e39b27 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 10:23:44 +00:00
Zbigniew Jędrzejewski-Szmek
0ad1aab965 Rebuilt for the bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-09 12:46:03 +02:00
Jan Macku
8c47980cce 10.25 2024-06-25 09:44:19 +02:00
Jan Macku
c8914f994c 10.24 2024-05-29 13:47:14 +02:00
Jan Macku
ad8da7feda 10.23 2024-04-16 10:45:05 +02:00
Jan Macku
414789841d 10.21 2024-02-07 16:15:54 +01:00
Jan Macku
8adbdb9e07 10.20 2024-01-30 14:08:15 +01:00
Fedora Release Engineering
7752abee23 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 22:44:52 +00:00
Fedora Release Engineering
c006ff8d74 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-20 23:06:38 +00:00
Fedora Release Engineering
d99531c1b0 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 07:26:30 +00:00
Jan Macku
6eb35fcbcc 10.19 2023-05-05 15:57:25 +02:00
Jan Macku
0627061939 10.18 2023-03-23 10:37:58 +01:00
Jan Macku
2ed7bf1db0 Convert to %autorelease and %autochangelog
[skip changelog]
2023-03-23 10:03:23 +01:00
Fedora Release Engineering
00bcdd18cf Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 13:10:56 +00:00
Jan Macku
32dd2e2fe5 10.17 2022-08-24 10:02:50 +02:00
Fedora Release Engineering
3620bdfb5b Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 14:41:01 +00:00
Adam Williamson
83747c72df Drop unnecessary obsoletes
Since initscripts requires these packages anyway, the obsoletes
aren't necessary. They're only useful if you split off a new
subpackage and *don't* have the main package require it, but
you still want it to be installed on updates. In this case,
initscripts requires both initscripts-rename-device and
initscripts-service, so there's no need for them to obsolete
older versions of it.

The initscripts-rename-device obsoletes was somehow messing up
live image creation during the openQA update test (caused the
live image not to include initscripts at all). This fixes that.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-02-23 17:25:36 -08:00
Jan Macku
d22d9d9fa5 10.16 2022-02-23 14:56:02 +01:00
Jan Macku
8fcd375eb6 10.15 2022-02-15 08:53:41 +01:00
Jan Macku
1977718793 10.14 2022-01-24 12:33:16 +01:00
Fedora Release Engineering
bc7e32837e - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 13:18:41 +00:00
Jan Macku
fa67978555 10.13 2022-01-13 09:17:02 +01:00
Jan Macku
4118d1a47d 10.12 2021-09-03 09:28:50 +02:00
Jan Macku
98deefd061 10.11 2021-08-27 09:58:25 +02:00
Jan Macku
063292249b 10.10 2021-08-26 12:01:42 +02:00
Fedora Release Engineering
e8db6a338d - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 08:35:29 +00:00
Jan Macku
78c1837894 10.09 2021-02-15 15:53:51 +01:00
Jan Macku
72516ea425 10.08 2021-02-04 14:48:17 +01:00
Fedora Release Engineering
a7d6b1722d - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 14:22:01 +00:00
Jan Macku
bf408b891a 10.07 2021-01-22 09:10:18 +01:00
Tom Stellard
8b9b6fa983 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-19 00:49:40 +00:00
Jan Macku
f682f2cda4 10.06 2020-11-13 10:30:46 +01:00
Jan Macku
dd1b01a7f2 10.05 2020-11-06 09:38:18 +01:00
Fedora Release Engineering
f8e9330962 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 01:49:17 +00:00
Jan Macku
16097e4697 10.04 2020-07-17 09:05:08 +02:00
Jan Macku
a6acd3cd5d 10.03 2020-03-25 10:09:06 +01:00
Fedora Release Engineering
20a3a8134f - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 05:28:40 +00:00
Fedora Release Engineering
8bc17aea41 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 09:32:45 +00:00
Jan Macku
c017856836 10.02 2019-06-28 15:07:03 +02:00
Fedora Release Engineering
a26dfde505 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 03:23:13 +00:00
David Kaspar [Dee'Kej]
58901cdc40 10.01 2018-08-06 13:16:24 +02:00
Fedora Release Engineering
99cbd9c275 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 05:44:00 +00:00
David Kaspar [Dee'Kej]
b218c70171 10.00 2018-06-21 16:42:17 +02:00
David Kaspar [Dee'Kej]
8f1d188016 specfile: fix failing build because of incorrect use of %{_isa} 2018-06-15 12:36:57 +02:00
David Kaspar [Dee'Kej]
7276c52c2c 9.83 2018-06-14 16:45:12 +02:00
David Kaspar [Dee'Kej]
b401eaeb06 rebase.sh: relative path is now used for the SRPM 2018-06-14 16:42:58 +02:00
David Kaspar [Dee'Kej]
c1a3a2c4c9 rebase.sh updated to do a scratch build before push 2018-06-13 14:24:57 +02:00
David Kaspar [Dee'Kej]
a9bd99de9a README.md updated 2018-06-13 13:52:36 +02:00
David Kaspar [Dee'Kej]
10556b4674 README.md pointing to upstream's description added 2018-06-13 13:51:29 +02:00
David Kaspar [Dee'Kej]
5caa862561 Revert "upstream's README.md added"
This reverts commit 828930f758.
2018-06-13 13:49:27 +02:00
David Kaspar [Dee'Kej]
828930f758 upstream's README.md added 2018-06-13 13:48:17 +02:00
David Kaspar [Dee'Kej]
5d86e6ecbf 9.82 2018-06-04 13:57:59 +02:00
David Kaspar [Dee'Kej]
cc0891ad5a 9.81 2018-06-01 15:09:09 +02:00
David Kaspar [Dee'Kej]
e68a9f6e5b specfile: fix of previous commit (triggerrun removed as intended) 2018-05-25 13:03:17 +02:00
David Kaspar [Dee'Kej]
b49d82372a 9.80 2018-05-25 12:56:09 +02:00
Karel Zak
ece91b6027 remove adjtime from buildroot too 2018-05-18 11:02:43 +02:00
Karel Zak
ec7561937e 9.79-4: move /etc/adjtime to util-linux 2018-05-18 10:46:44 +02:00
Igor Gnatenko
66424e8dfc
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:04:44 +01:00
Fedora Release Engineering
19f61713dc - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 17:29:31 +00:00
David Kaspar
5c3ed97c09 Merge #1 Add CI tests using the standard test interface 2018-01-05 10:44:48 +00:00
David Kaspar [Dee'Kej]
d98dff205a 9.79 2018-01-02 16:31:51 +01:00
esakaiev
b141ea22e9 Adding cnhages in Sanity-init-scripts-LSB, according to the http://pkgs.devel.redhat.com/cgit/tests/initscripts/commit/ 2017-12-19 19:00:08 +02:00
esakaiev
b847d3463c Removing .gitignore from new_tests branch 2017-12-14 19:41:15 +02:00
esakaiev
6c34f25ae1 Adding initscripts tests to the new-tests branch 2017-12-12 18:50:57 +02:00
esakaiev
73d57eaa5b Initial commit, adding .gitignore to the master branch 2017-12-12 18:49:11 +02:00
David Kaspar [Dee'Kej]
dcade7bff5 9.78 2017-11-09 11:27:23 +01:00
David Kaspar [Dee'Kej]
c155b1dbda 9.77 2017-08-15 14:35:16 +02:00
Zbigniew Jędrzejewski-Szmek
14f11104dd Rebuild after builds with rpm 4.14 were untagged 2017-08-11 06:57:06 -04:00
Zbigniew Jędrzejewski-Szmek
d3caf21a29 Fix compilation on s390x 2017-08-10 15:29:31 -04:00
David Kaspar [Dee'Kej]
8e43169ab0 9.76 2017-08-07 17:02:27 +02:00
David Kaspar [Dee'Kej]
ee6edab6e6 9.75 2017-08-07 14:46:31 +02:00
David Kaspar [Dee'Kej]
eaffb9550b 9.74 2017-08-04 16:53:29 +02:00
Fedora Release Engineering
b6ab9a6dbf - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 23:47:46 +00:00
Fedora Release Engineering
c8768ae27b - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 13:34:18 +00:00
David Kaspar [Dee'Kej]
243b64adc1 9.72 2017-05-25 17:59:35 +02:00
David Kaspar [Dee'Kej]
a11c2d64d6 9.71 2017-05-25 11:27:59 +02:00
Lukas Nykryn
049c81f2d3 9.70 2017-02-28 10:19:41 +01:00
Fedora Release Engineering
f259f7b866 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 16:26:32 +00:00
David Kaspar [Dee'Kej]
37ba55c6e6 9.69-1 2016-08-30 15:43:36 +02:00
David Kaspar [Dee'Kej]
959a96814c 9.68-1 2016-08-09 15:29:15 +02:00
Lukas Nykryn
a14ce69b23 9.67-1 2016-07-19 13:47:24 +02:00
Lukas Nykryn
bd7342c31a 9.66-1 2016-04-25 15:34:39 +02:00
Dennis Gilmore
3713379034 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 00:32:09 +00:00
Lukas Nykryn
443c9aaa40 9.65-1 2015-12-07 14:41:15 +01:00
Lukas Nykryn
15694203da 9.64-1 2015-08-06 16:49:01 +02:00
Dennis Gilmore
b68d903213 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 11:25:01 +00:00
Lukas Nykryn
c777c519e0 9.63-1 2015-05-18 15:13:36 +02:00
Lukas Nykryn
4567b472f6 9.62-1 2015-04-09 16:20:59 +02:00
Lukas Nykryn
53878cc54c 9.61-1 2015-01-26 12:27:06 +01:00
Lukas Nykryn
6ebdb7b94e 9.60-1 2014-12-16 15:48:32 +01:00
Lukas Nykryn
245053800f improve check for bond_master in install bonding driver
Conflicts:
	initscripts.spec
2014-12-08 13:59:57 +01:00
Lukas Nykryn
53f566228b 9.59-1 2014-11-12 13:00:52 +01:00
Lukas Nykryn
a8ac62456e 9.58-1 2014-11-06 11:05:48 +01:00
Lukas Nykryn
fab7fb2c58 9.56.1-2 2014-10-14 19:55:49 -04:00
Zbigniew Jędrzejewski-Szmek
ed75de05f9 9.56.1-1 2014-10-07 23:13:59 -04:00
Zbigniew Jędrzejewski-Szmek
6ee1b79261 Update fedora-import-state 2014-10-06 11:54:07 -04:00
Peter Robinson
8c1e6907e1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 21:35:16 +00:00
Lukas Nykryn
80893f4dcc 9.55-1 2014-07-22 14:08:00 +02:00
Tom Callaway
f1984484cc fix license handling 2014-07-12 18:11:16 -04:00
Dennis Gilmore
e80bb8dbda - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 17:22:50 -05:00
Lukas Nykryn
cafd67658d don't require sysctl, it is in procps anyway 2014-05-21 14:41:59 +02:00
Lukas Nykryn
4164be8048 9.54-2 2014-04-24 14:04:12 +02:00
Lukas Nykryn
8864f56507 9.53-1 2014-03-26 15:55:49 +01:00
Lukas Nykryn
ae47582eca 9.52-1 2014-01-14 14:00:46 +01:00
Lukas Nykryn
c6d9bd9aad 9.51-1 2014-01-14 13:44:42 +01:00
Lukas Nykryn
099673c581 pidof is now in procps-ng 2013-10-17 16:39:05 +02:00
Lukas Nykryn
f7039eb7f6 9.50-1 2013-09-03 17:58:01 +02:00
Dennis Gilmore
d4dc0e32a1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-03 14:39:39 -05:00
Lukas Nykryn
59555c9332 9.48-1 2013-07-12 10:36:33 +02:00
Lukas Nykryn
65eb00a889 9.47-1 2013-05-31 09:54:31 +02:00
Lukas Nykryn
f09524c211 9.46-1 2013-04-12 13:13:13 +02:00
Lukas Nykryn
9d23d438cd provide /sbin/service 2013-03-15 17:03:42 +01:00
Lukas Nykryn
64e9706ce5 9.45-1 2013-03-15 14:43:17 +01:00
Lukas Nykryn
74a8b609bd 9.44-1 2013-02-20 16:39:19 +01:00
Dennis Gilmore
a29438ae63 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 20:06:47 -06:00
Bill Nottingham
842dab63cc Fix build 2012-12-07 16:25:30 -05:00
Bill Nottingham
ce34f2bef7 9.43-1 2012-12-07 16:16:28 -05:00
Bill Nottingham
ff31925b49 Add fedora-storage-init removal. From Peter Ranjoha (<prajnoha@redhat.com>) 2012-10-31 13:34:06 -04:00
Bill Nottingham
cf12f9c5b5 9.42-1 2012-10-31 13:19:55 -04:00
Bill Nottingham
75edb0d55f Bugfix patches 2012-10-08 16:29:42 -04:00
Bill Nottingham
fbe2e8f218 9.41-1 2012-10-05 11:45:30 -04:00
Bill Nottingham
2b9f30696c 9.40-1 2012-08-06 15:54:16 -04:00
Bill Nottingham
2c40e7fcbc 9.40-1 2012-08-06 15:54:06 -04:00
Dennis Gilmore
75b6b7c807 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-19 09:52:29 -05:00
Bill Nottingham
870007dd96 fix udev unit naming 2012-07-09 14:48:39 -04:00
Bill Nottingham
a245890179 9.39-1 2012-06-29 16:59:44 -04:00
Bill Nottingham
8aa7444ea1 9.38-1 2012-06-29 15:42:00 -04:00
Kay Sievers
414bd21ae2 fix udev units in fedora-wait-storage.service for rawhide systemd 2012-05-29 22:52:09 +02:00
Bill Nottingham
e7c935bc15 9.37-1 2012-03-16 10:28:56 -04:00
Bill Nottingham
77b45d9a00 Fix typo in scriptlet. Yes, I am an idiot for not checking this. 2012-03-14 14:45:00 -04:00
Bill Nottingham
ceaa03281f 9.36-1 2012-03-12 14:16:01 -04:00
Bill Nottingham
34a8a952b8 Dead patch. 2012-03-09 11:45:43 -05:00
Bill Nottingham
0d1e704f9c 9.35-1 2012-03-09 11:35:36 -05:00
Dennis Gilmore
c6fdeed320 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 23:50:31 -06:00
Peter Robinson
2ca8bdedf3 mktemp was long obsoleted by coreutils 2011-12-29 16:18:17 +00:00
Peter Robinson
019f719dc2 update util-linux-ng -> util-linux 2011-12-29 16:14:14 +00:00
Bill Nottingham
ef8481f550 add patch 2011-10-25 15:43:04 -04:00
Bill Nottingham
c9173e1a0e 9.34-1 plus a patch 2011-10-25 15:36:39 -04:00
Bill Nottingham
870a56405c Fix build 2011-10-12 17:03:15 -04:00
Bill Nottingham
3e01f14929 Update to 9.33 2011-10-12 16:53:52 -04:00
Bill Nottingham
11c17fbf37 Clean up consoletype-related noise. 2011-09-19 17:49:02 -04:00
Bill Nottingham
52f41a0902 9.32-1 2011-09-02 15:47:55 -04:00
Bill Nottingham
6c00bf1598 Remove fedora-sysinit-hack/unhack 2011-07-25 15:06:15 -04:00
Bill Nottingham
067b5ca6da Add patch for multipath/udev issue. (#723357, <bmarzins@redhat.com>) 2011-07-22 13:41:15 -04:00
Bill Nottingham
4c3a9506dd 9.31-1 2011-06-21 15:45:28 -04:00
Bill Nottingham
748d26b54a Update to 9.30 2011-04-27 13:24:51 -04:00
Bill Nottingham
5c23e7c369 9.29-1 2011-04-06 16:23:32 -04:00
Bill Nottingham
1807e68090 9.28-1 2011-03-25 16:40:08 -04:00
Bill Nottingham
9ad80a31c1 9.27-1 2011-03-17 12:34:47 -04:00
Bill Nottingham
aba3aa462f 9.26-1 2011-03-10 16:00:46 -05:00
Bill Nottingham
6104485508 9.25-1 2011-02-25 15:17:03 -05:00
Dennis Gilmore
4ae876cf42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-09 06:36:12 -06:00
Bill Nottingham
3c2f7d5a40 Stop living in the past! 2011-01-21 11:47:14 -05:00
Bill Nottingham
8f1827e3d3 9.24-1 2011-01-21 11:46:43 -05:00
Bill Nottingham
d9d8eefc2e - accept '#' in ethernet device names (#663904, <matt_domsch@dell.com>) 2010-12-17 15:03:58 -05:00
Bill Nottingham
02b7a226d1 - accept '#' in ethernet device names (#663904, <matt_domsch@dell.com>) 2010-12-17 15:03:21 -05:00
Bill Nottingham
066961f271 Add patch. 2010-12-06 15:36:29 -05:00
Bill Nottingham
2aafe3c1f3 bump 2010-12-06 15:06:47 -05:00
Bill Nottingham
9e170682de Fix routing regression. # Please enter the commit message for your changes. Lines starting 2010-12-06 15:05:00 -05:00
Bill Nottingham
6aa3868908 9.23-1 2010-12-02 14:36:03 -05:00
Bill Nottingham
884d2ff009 Remove crypttab handling services. 2010-11-16 22:20:47 -05:00
Bill Nottingham
66aecb0132 9.22-1 2010-11-16 22:01:33 -05:00
Bill Nottingham
dfd7e3a3bd Doh. 2010-10-07 11:53:31 -04:00
Bill Nottingham
137e05c789 remove default.target 2010-10-07 11:21:56 -04:00
Jesse Keating
c47fcd4ae2 - Rebuilt for gcc bug 634757 2010-09-29 14:29:18 -07:00
Bill Nottingham
d629c4ab27 Haaack 2010-09-17 17:14:17 -04:00
Bill Nottingham
7caf2bf20d typo 2010-09-17 14:09:57 -04:00
Bill Nottingham
b012c93a5b 9.21-1 2010-09-17 14:08:50 -04:00
10 changed files with 1822 additions and 275 deletions

66
.gitignore vendored
View file

@ -1 +1,65 @@
/initscripts-9.20.2.tar.bz2
/initscripts-9.43.tar.bz2
/initscripts-9.44.tar.bz2
/initscripts-9.45.tar.bz2
/initscripts-9.46.tar.bz2
/initscripts-9.47.tar.bz2
/initscripts-9.48.tar.bz2
/initscripts-9.50.tar.bz2
/initscripts-9.51.tar.bz2
/initscripts-9.52.tar.bz2
/initscripts-9.53.tar.bz2
/initscripts-9.54.tar.bz2
/initscripts-9.55.tar.bz2
/initscripts-9.56.1.tar.bz2
/initscripts-9.58.tar.bz2
/initscripts-9.59.tar.bz2
/initscripts-9.60.tar.bz2
/initscripts-9.61.tar.bz2
/initscripts-9.62.tar.bz2
/initscripts-9.63.tar.bz2
/initscripts-9.64.tar.bz2
/initscripts-9.65.tar.bz2
/initscripts-9.66.tar.bz2
/initscripts-9.67.tar.bz2
/initscripts-9.68.tar.bz2
/initscripts-9.69.tar.bz2
/initscripts-9.70.tar.gz
/initscripts-9.71.tar.gz
/initscripts-9.72.tar.gz
/initscripts-9.74.tar.gz
/initscripts-9.75.tar.gz
/initscripts-9.76.tar.gz
/initscripts-9.77.tar.gz
/initscripts-9.78.tar.gz
/initscripts-9.79.tar.gz
/initscripts-9.80.tar.gz
/initscripts-9.81.tar.gz
/initscripts-9.82.tar.gz
/initscripts-9.83.tar.gz
/initscripts-10.00.tar.gz
/initscripts-10.01.tar.gz
/initscripts-10.02.tar.gz
/initscripts-10.03.tar.gz
/initscripts-10.04.tar.gz
/initscripts-10.05.tar.gz
/initscripts-10.06.tar.gz
/initscripts-10.07.tar.gz
/initscripts-10.08.tar.gz
/initscripts-10.09.tar.gz
/initscripts-10.10.tar.gz
/initscripts-10.11.tar.gz
/initscripts-10.12.tar.gz
/initscripts-10.13.tar.gz
/initscripts-10.14.tar.gz
/initscripts-10.15.tar.gz
/initscripts-10.16.tar.gz
/initscripts-10.17.tar.gz
/initscripts-10.18.tar.gz
/initscripts-10.19.tar.gz
/initscripts-10.20.tar.gz
/initscripts-10.21.tar.gz
/initscripts-10.23.tar.gz
/initscripts-10.24.tar.gz
/initscripts-10.25.tar.gz
/initscripts-10.26.tar.gz
/initscripts-10.27.tar.gz

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# Additional information
Check upstream's [README.md](https://github.com/fedora-sysv/initscripts/blob/master/README.md) for more info.

File diff suppressed because it is too large Load diff

29
rebase.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
# We always do a rebase to new upstream's tarball for Fedora Rawhide.
#
# For non-Rawhide Fedora releases, we can sometimes backport specific patches,
# if the rebase is not possible.
#
# This scripts automates this process.
# Since we are operating in a dist-git repository where we can't fix things with
# --force-push if something goes wrong, we need to be extra careful and exit
# immediately if something fails.
set -e
curl https://raw.githubusercontent.com/fedora-sysv/initscripts/master/initscripts.spec -o initscripts.spec || exit 1
spectool -g initscripts.spec
# Make a local scratch build in mock first. If it fails, do not upload new tarball!
# srpm_file="$(basename $(fedpkg srpm | grep -i "wrote" | cut -d ':' -f 2))"
# arch="$(uname -p)"
# mock -r "fedora-rawhide-${arch}" "${srpm_file}" || exit 2
# Scratch build passed, the build should pass in Koji as well. Let's proceed:
fedpkg new-sources "$(basename $(spectool -S -l initscripts.spec | gawk '{print $2;}'))" || exit 3
git add initscripts.spec
git commit -m "$(grep Version initscripts.spec | gawk '{print $2;}')"
git show

View file

@ -1 +1 @@
cdfe366252ebe441c72d7272a6d39cb6 initscripts-9.20.2.tar.bz2
SHA512 (initscripts-10.27.tar.gz) = 951f88158eaf7409f7d65c9875c9ba2611e6a805c17112ddbb34167a1638d87d2433c3962d20e66564669f3424dd7be1265cbe03a1a7d6b1c5413ed43d80148d

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/initscripts/Sanity/init-scripts-LSB
# Description: Init scripts should meet LSB specifications
# Author: Yulia Kopkova <ykopkova@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/initscripts/Sanity/init-scripts-LSB
export TESTVERSION=1.4
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Jan Scotka <jscotka@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Init scripts should meet LSB specifications" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: initscripts" >> $(METADATA)
@echo "Requires: initscripts" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: RedHatEnterpriseLinux6" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/initscripts/Sanity/init-scripts-LSB
Description: Init scripts should meet LSB specifications
Author: Yulia Kopkova <ykopkova@redhat.com>

View file

@ -0,0 +1,228 @@
#!/bin/bash
# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/initscripts/Sanity/init-scripts-LSB
# Description: Init scripts should meet LSB specifications
# Author: Jan Scotka <jscotka@redhat.com>, Yulia Kopkova <ykopkova@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include rhts environment
. /usr/bin/rhts-environment.sh
. /usr/share/rhts-library/rhtslib.sh
PACKAGE="initscripts"
SRV_NETCONSOLE=netconsole
SRV_NETFS=netfs
TRG_REMOTEFS=remote-fs.target
SRV_NETWORK=network
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "useradd testuserqa" 0 "Add test user"
rlFileBackup /etc/sysconfig/netconsole
if rlIsRHEL '<7'; then #there is no syslog in rhel7 and highier
rlRun "sed -i -e 's,^# SYSLOGADDR=,SYSLOGADDR=redhat.com,' /etc/sysconfig/netconsole" 0 "Set remote syslog server address /etc/sysconfig/netconsole"
fi
rlPhaseEnd
rlPhaseStartTest "netconsole service LSB compliance test"
if ls /lib*/modules/*/kernel/drivers/net/netconsole.ko*; then
rlRun "ls /lib*/modules/*/kernel/drivers/net/netconsole.ko*" 0
if rlIsRHEL '<7'; then
SERVICE=$SRV_NETCONSOLE
rlServiceStop $SERVICE
rlLog ">>>>>>>>> service start"
rlRun "service $SERVICE start" 0 " Service must start without problem "
rlRun "service $SERVICE status" 0 " Then Status command "
rlRun "service $SERVICE start" 0 " Already started service "
rlRun "service $SERVICE status" 0 " Again status command "
rlLog ">>>>>>>>> service restart"
rlRun "service $SERVICE restart" 0 " Restarting of service "
rlRun "service $SERVICE status" 0 " Status command "
rlLog ">>>>>>>>> service stop"
rlRun "service $SERVICE stop" 0 " Stopping service "
rlRun "service $SERVICE status" 3 " Status of stopped service "
rlRun "service $SERVICE stop" 0 " Stopping service again "
rlRun "service $SERVICE status" 3 " Status of stopped service "
rlLog ">>>>>>>>> insufficient rights"
rlRun "service $SERVICE start " 0 " Starting service for restarting under nonpriv user "
rlRun "su testuserqa -c 'service $SERVICE restart'" 1 "Insufficient rights, restarting resrvice under nonprivileged user must fail "
rlLog ">>>>>>>>> operations"
rlServiceStop $SERVICE
rlRun "service $SERVICE start" 0 " Service have to implement start function "
rlRun "service $SERVICE restart" 0 " Service have to implement restart function "
rlRun "service $SERVICE status" 0 " Service have to implement status function "
rlRun "service $SERVICE condrestart" 0 " Service have to implement condrestart function "
rlRun "service $SERVICE reload" 0 " Service have to implement reload function "
rlRun "service $SERVICE force-reload" 0 " Service have to implement force-reload function "
rlLog ">>>>>>>>> nonexist operations"
rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function "
rlServiceRestore $SERVICE
fi # rhel 6 or less
else
rlLog ">>>> no netconsole kernel module appear here"
rlRun "ls /lib*/modules/*/kernel/drivers/net/netconsole.ko*" 1,2
fi
rlLog "NIC should support polling, NETPOLL should be compliled in kernel and netconsole module should be loaded"
rlLog "`cat /usr/src/kernels/$(uname -r)/.config | grep -i poll`"
rlLog "netconsole module: `lsmod | grep -i netconsole && echo true || echo false`"
rlLog "`cat /var/log/messages | grep -i netconsole | tail -n 10`"
rlPhaseEnd
# for RHEL6 and lower
if rlIsRHEL '<7'; then
rlPhaseStartTest "netfs service LSB compliance test"
SERVICE=$SRV_NETFS
rlServiceStop $SERVICE
rlLog ">>>>>>>>> service start"
rlRun "service $SERVICE start" 0 " Service must start without problem "
rlRun "service $SERVICE status" 0 " Then Status command "
rlRun "service $SERVICE start" 0 " Already started service "
rlRun "service $SERVICE status" 0 " Again status command "
rlLog ">>>>>>>>> service restart"
rlRun "service $SERVICE restart" 0 " Restarting of service "
rlRun "service $SERVICE status" 0 " Status command "
rlLog ">>>>>>>>> service stop"
rlRun "service $SERVICE stop" 0 " Stopping service "
rlRun "service $SERVICE status" 3 " Status of stopped service "
rlRun "service $SERVICE stop" 0 " Stopping service again "
rlRun "service $SERVICE status" 3 " Status of stopped service "
rlLog ">>>>>>>>> insufficient rights"
rlRun "service $SERVICE start " 0 " Starting service for restarting under nonpriv user "
rlRun "su testuserqa -c 'service $SERVICE restart'" 4 "Insufficient rights, restarting resrvice under nonprivileged user must fail "
rlLog ">>>>>>>>> operations"
rlServiceStop $SERVICE
rlRun "service $SERVICE start" 0 " Service have to implement start function "
rlRun "service $SERVICE restart" 0 " Service have to implement restart function "
rlRun "service $SERVICE status" 0 " Service have to implement status function "
rlLog ">>>>>>>>> nonexist operations"
rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function "
rlServiceRestore $SERVICE
rlPhaseEnd
else
rlPhaseStartTest "remote-fs target LSB compliance test"
TARGET=$TRG_REMOTEFS
rlServiceStop $TARGET
rlLog ">>>>>>>>> target start"
rlRun "service $TARGET start" 0 " Target must start without problem "
rlRun "service $TARGET status" 0 " Then Status command "
rlRun "service $TARGET start" 0 " Already started target "
rlRun "service $TARGET status" 0 " Again status command "
rlLog ">>>>>>>>> target restart"
rlRun "service $TARGET restart" 0 " Restarting target "
rlRun "service $TARGET status" 0 " Status command "
rlLog ">>>>>>>>> target stop"
rlRun "service $TARGET stop" 0 " Stopping target "
rlRun "service $TARGET status" 3 " Status of stopped target "
rlRun "service $TARGET stop" 0 " Stopping target again "
rlRun "service $TARGET status" 3 " Status of stopped target "
rlLog ">>>>>>>>> insufficient rights"
rlRun "service $TARGET start " 0 " Starting target for restarting under nonpriv user "
rlRun "su testuserqa -c 'service $TARGET restart'" 1 " Insufficient rights, restarting target under nonprivileged user must fail " # returns 1 instead of 4 because of polkit
rlLog ">>>>>>>>> operations"
rlServiceStop $TARGET
rlRun "service $TARGET start" 0 " Target have to implement start function "
rlRun "service $TARGET restart" 0 " Target have to implement restart function "
rlRun "service $TARGET status" 0 " Target have to implement status function "
rlLog ">>>>>>>>> nonexist operations"
rlRun "service $TARGET noexistop" 2 " Testing proper return code when nonexisting function "
rlServiceRestore $TARGET
rlPhaseEnd
fi
# rlPhaseStartTest "$SRV_NETWORK service LSB compliance test"
#
# SERVICE=$SRV_NETWORK
# rlServiceStop $SERVICE
# rlLog ">>>>>>>>> service start"
# rlRun "service $SERVICE start" 0 " Service must start without problem "
# rlRun "service $SERVICE status" 0 " Then Status command "
# rlRun "service $SERVICE start" 1,0 " Already started service "
# rlRun "service $SERVICE status" 0 " Again status command "
# rlLog ">>>>>>>>> service restart"
# rlRun "service $SERVICE restart" 0 " Restarting of service "
# rlRun "service $SERVICE status" 0 " Status command "
# rlLog ">>>>>>>>> service stop"
# rlRun "service $SERVICE stop" 0 " Stopping service "
# rlRun "service $SERVICE status" 0 " Status of stopped service "
# rlRun "service $SERVICE stop" 0 " Stopping service again "
# rlRun "service $SERVICE status" 0 " Status of stopped service "
# rlLog ">>>>>>>>> insufficient rights"
# rlRun "service $SERVICE start " 0 " Starting service for restarting under nonpriv user "
# rlRun "su testuserqa -c 'service $SERVICE restart'" 4 "Insufficient rights, restarting resrvice under nonprivileged user must fail "
# rlLog ">>>>>>>>> operations"
# rlServiceStop $SERVICE
# rlRun "service $SERVICE start" 0 " Service have to implement start function "
# rlRun "service $SERVICE restart" 0 " Service have to implement restart function "
# rlRun "service $SERVICE status" 0 " Service have to implement status function "
# rlRun "service $SERVICE reload" 0 " Service have to implement reload function "
# rlRun "service $SERVICE force-reload" 0 " Service have to implement force-reload function "
# rlLog ">>>>>>>>> nonexist operations"
# rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function "
# rlServiceRestore $SERVICE
# service $SERVICE start
rlPhaseEnd
rlPhaseStartCleanup
rlRun "userdel -fr testuserqa" 0 "Remove test user"
rlFileRestore
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

291
tests/standard-inventory-qcow2 Executable file
View file

@ -0,0 +1,291 @@
#!/usr/bin/env python
import argparse
import errno
import json
import os
import shutil
import shlex
import signal
import socket
import subprocess
import sys
import tempfile
import time
import distutils.util
IDENTITY = """
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA1DrTSXQRF8isQQfPfK3U+eFC4zBrjur+Iy15kbHUYUeSHf5S
jXPYbHYqD1lHj4GJajC9okle9rykKFYZMmJKXLI6987wZ8vfucXo9/kwS6BDAJto
ZpZSj5sWCQ1PI0Ce8CbkazlTp5NIkjRfhXGP8mkNKMEhdNjaYceO49ilnNCIxhpb
eH5dH5hybmQQNmnzf+CGCCLBFmc4g3sFbWhI1ldyJzES5ZX3ahjJZYRUfnndoUM/
TzdkHGqZhL1EeFAsv5iV65HuYbchch4vBAn8jDMmHh8G1ixUCL3uAlosfarZLLyo
3HrZ8U/llq7rXa93PXHyI/3NL/2YP3OMxE8baQIDAQABAoIBAQCxuOUwkKqzsQ9W
kdTWArfj3RhnKigYEX9qM+2m7TT9lbKtvUiiPc2R3k4QdmIvsXlCXLigyzJkCsqp
IJiPEbJV98bbuAan1Rlv92TFK36fBgC15G5D4kQXD/ce828/BSFT2C3WALamEPdn
v8Xx+Ixjokcrxrdeoy4VTcjB0q21J4C2wKP1wEPeMJnuTcySiWQBdAECCbeZ4Vsj
cmRdcvL6z8fedRPtDW7oec+IPkYoyXPktVt8WsQPYkwEVN4hZVBneJPCcuhikYkp
T3WGmPV0MxhUvCZ6hSG8D2mscZXRq3itXVlKJsUWfIHaAIgGomWrPuqC23rOYCdT
5oSZmTvFAoGBAPs1FbbxDDd1fx1hisfXHFasV/sycT6ggP/eUXpBYCqVdxPQvqcA
ktplm5j04dnaQJdHZ8TPlwtL+xlWhmhFhlCFPtVpU1HzIBkp6DkSmmu0gvA/i07Z
pzo5Z+HRZFzruTQx6NjDtvWwiXVLwmZn2oiLeM9xSqPu55OpITifEWNjAoGBANhH
XwV6IvnbUWojs7uiSGsXuJOdB1YCJ+UF6xu8CqdbimaVakemVO02+cgbE6jzpUpo
krbDKOle4fIbUYHPeyB0NMidpDxTAPCGmiJz7BCS1fCxkzRgC+TICjmk5zpaD2md
HCrtzIeHNVpTE26BAjOIbo4QqOHBXk/WPen1iC3DAoGBALsD3DSj46puCMJA2ebI
2EoWaDGUbgZny2GxiwrvHL7XIx1XbHg7zxhUSLBorrNW7nsxJ6m3ugUo/bjxV4LN
L59Gc27ByMvbqmvRbRcAKIJCkrB1Pirnkr2f+xx8nLEotGqNNYIawlzKnqr6SbGf
Y2wAGWKmPyEoPLMLWLYkhfdtAoGANsFa/Tf+wuMTqZuAVXCwhOxsfnKy+MNy9jiZ
XVwuFlDGqVIKpjkmJyhT9KVmRM/qePwgqMSgBvVOnszrxcGRmpXRBzlh6yPYiQyK
2U4f5dJG97j9W7U1TaaXcCCfqdZDMKnmB7hMn8NLbqK5uLBQrltMIgt1tjIOfofv
BNx0raECgYEApAvjwDJ75otKz/mvL3rUf/SNpieODBOLHFQqJmF+4hrSOniHC5jf
f5GS5IuYtBQ1gudBYlSs9fX6T39d2avPsZjfvvSbULXi3OlzWD8sbTtvQPuCaZGI
Df9PUWMYZ3HRwwdsYovSOkT53fG6guy+vElUEDkrpZYczROZ6GUcx70=
-----END RSA PRIVATE KEY-----
"""
USER_DATA = """#cloud-config
users:
- default
- name: root
groups: sudo
shell: /bin/bash
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUOtNJdBEXyKxBB898rdT54ULjMGuO6v4jLXmRsdRhR5Id/lKNc9hsdioPWUePgYlqML2iSV72vKQoVhkyYkpcsjr3zvBny9+5xej3+TBLoEMAm2hmllKPmxYJDU8jQJ7wJuRrOVOnk0iSNF+FcY/yaQ0owSF02Nphx47j2KWc0IjGGlt4fl0fmHJuZBA2afN/4IYIIsEWZziDewVtaEjWV3InMRLllfdqGMllhFR+ed2hQz9PN2QcapmEvUR4UCy/mJXrke5htyFyHi8ECfyMMyYeHwbWLFQIve4CWix9qtksvKjcetnxT+WWrutdr3c9cfIj/c0v/Zg/c4zETxtp standard-test-qcow2
ssh_pwauth: True
chpasswd:
list: |
root:foobar
expire: False
runcmd:
- mkfs.ext4 /dev/sdb
- mount /dev/sdb /usr/local
- sudo mount -o remount,rw /usr
- mkdir /expected /output
"""
def main(argv):
parser = argparse.ArgumentParser(description="Inventory for a QCow2 test image")
parser.add_argument("--list", action="store_true", help="Verbose output")
parser.add_argument('--host', help="Get host variables")
parser.add_argument("subjects", nargs="*", default=shlex.split(os.environ.get("TEST_SUBJECTS", "")))
opts = parser.parse_args()
try:
if opts.host:
data = host(opts.host)
else:
data = list(opts.subjects)
sys.stdout.write(json.dumps(data, indent=4, separators=(',', ': ')))
except RuntimeError as ex:
sys.stderr.write("{0}: {1}\n".format(os.path.basename(sys.argv[0]), str(ex)))
return 1
return 0
def list(subjects):
hosts = []
variables = {}
for subject in subjects:
if subject.endswith((".qcow2", ".qcow2c")):
vars = host(subject)
if vars:
hosts.append(subject)
variables[subject] = vars
return {"localhost": {"hosts": hosts, "vars": {}}, "subjects": {"hosts": hosts, "vars": {}},
"_meta": {"hostvars": variables}}
def start_qemu(image, cloudinit, log, disk_directory=None, disk_size=None, portrange=(2222, 5555)):
for port in xrange(*portrange):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
try:
sock.bind(("127.0.0.3", port))
if disk_size:
return subprocess.Popen(["/usr/bin/qemu-system-x86_64", "-m", "1024", image,
"-enable-kvm", "-snapshot", "-cdrom", cloudinit,
"-hdb", disk_directory,
"-net", "nic,model=virtio", "-net",
"user,hostfwd=tcp:127.0.0.3:{0}-:22".format(port),
"-device", "isa-serial,chardev=pts2", "-chardev", "file,id=pts2,path=" + log,
"-display", "none"], stdout=open(os.devnull, 'w')), port
else:
return subprocess.Popen(["/usr/bin/qemu-system-x86_64", "-m", "1024", image,
"-enable-kvm", "-snapshot", "-cdrom", cloudinit,
"-net", "nic,model=virtio", "-net",
"user,hostfwd=tcp:127.0.0.3:{0}-:22".format(port),
"-device", "isa-serial,chardev=pts2", "-chardev", "file,id=pts2,path=" + log,
"-display", "none"], stdout=open(os.devnull, 'w')), port
except IOError:
pass
finally:
sock.close()
else:
raise RuntimeError("unable to find free local port to map SSH to")
def host(image):
null = open(os.devnull, 'w')
try:
tty = os.open("/dev/tty", os.O_WRONLY)
os.dup2(tty, 2)
except OSError:
tty = None
pass
# A directory for temporary stuff
directory = tempfile.mkdtemp(prefix="inventory-cloud")
identity = os.path.join(directory, "identity")
with open(identity, 'w') as f:
f.write(IDENTITY)
os.chmod(identity, 0o600)
metadata = os.path.join(directory, "meta-data")
with open(metadata, 'w') as f:
f.write("")
userdata = os.path.join(directory, "user-data")
with open(userdata, 'w') as f:
f.write(USER_DATA)
# Create additional disk
disk_size = None
disk_directory = None
try:
disk_size = os.environ.get("EXTEND_DISK_SIZE")
if disk_size:
sys.stderr.write("\nCreate additional cloud init disk DISK SIZE {}\n".format(disk_size))
disk_directory = "{}/atomic-host-disk2-{}".format(directory, disk_size)
subprocess.check_call(["qemu-img", "create", "-f", "qcow2", disk_directory, disk_size], stdout=null)
except KeyError:
sys.stderr.write("\nCouldn't create additional cloud init disk DISK SIZE\n")
pass
# Create our cloud init so we can log in
cloudinit = os.path.join(directory, "cloud-init.iso")
subprocess.check_call(["/usr/bin/genisoimage", "-input-charset", "utf-8",
"-volid", "cidata", "-joliet", "-rock", "-quiet",
"-output", cloudinit, userdata, metadata], stdout=null)
# Determine if virtual machine should be kept available for diagnosis after completion
try:
diagnose = distutils.util.strtobool(os.getenv("TEST_DEBUG", "0"))
except ValueError:
diagnose = 0
sys.stderr.write("Launching virtual machine for {0}\n".format(image))
# And launch the actual VM
artifacts = os.environ.get("TEST_ARTIFACTS", os.path.join(os.getcwd(), "artifacts"))
try:
os.makedirs(artifacts)
except OSError as exc:
if exc.errno != errno.EEXIST or not os.path.isdir(artifacts):
raise
log = os.path.join(artifacts, "{0}.log".format(os.path.basename(image)))
proc = None # for failure detection
cpe = None # for exception scoping
for tries in xrange(0, 5):
try:
proc, port = start_qemu(image, cloudinit, log, disk_directory=disk_directory, disk_size=disk_size)
break
except subprocess.CalledProcessError as cpe:
time.sleep(1)
continue
if proc is None:
raise RuntimeError("Could not launch VM for qcow2 image"
" '{0}':{1}".format(image, cpe.output))
# The variables
variables = {"ansible_ssh_port": "{0}".format(port),
"ansible_ssh_host": "127.0.0.3",
"ansible_ssh_user": "root",
"ansible_ssh_pass": "foobar",
"ansible_ssh_private_key_file": identity,
"ansible_ssh_common_args": "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"}
# Write out a handy inventory file, for our use and for debugging
args = " ".join(["{0}='{1}'".format(*item) for item in variables.items()])
inventory = os.path.join(directory, "inventory")
with open(inventory, "w") as f:
f.write("[subjects]\nlocalhost {1}\n".format(image, args))
# Wait for ssh to come up
ping = ["/usr/bin/ansible", "--inventory", inventory, "localhost", "--module-name", "raw", "--args", "/bin/true"]
for tries in xrange(0, 30):
try:
(pid, ret) = os.waitpid(proc.pid, os.WNOHANG)
if pid != 0:
raise RuntimeError("qemu failed to launch qcow2 image: {0}".format(image))
subprocess.check_call(ping, stdout=null, stderr=null)
break
except subprocess.CalledProcessError:
time.sleep(3)
else:
# Kill the qemu process
try:
os.kill(proc.pid, signal.SIGTERM)
except OSError:
pass
raise RuntimeError("could not access launched qcow2 image: {0}".format(image))
# Process of our parent
ppid = os.getppid()
child = os.fork()
if child:
return variables
# Daemonize and watch the processes
os.chdir("/")
os.setsid()
os.umask(0)
if tty is None:
tty = null.fileno()
# Duplicate standard input to standard output and standard error.
os.dup2(null.fileno(), 0)
os.dup2(tty, 1)
os.dup2(tty, 2)
# Now wait for the parent process to go away, then kill the VM
while True:
time.sleep(3)
try:
os.kill(ppid, 0)
os.kill(proc.pid, 0)
except OSError:
break # Either of the processes no longer exist
if diagnose:
sys.stderr.write("\n")
sys.stderr.write("DIAGNOSE: ssh -p {0} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "
"root@{1} # password: {2}\n".format(port, "127.0.0.3", "foobar"))
sys.stderr.write("DIAGNOSE: export ANSIBLE_INVENTORY={0}\n".format(inventory))
sys.stderr.write("DIAGNOSE: kill {0} # when finished\n".format(os.getpid()))
def _signal_handler(*args):
sys.stderr.write("\nDIAGNOSE ending...\n")
signal.signal(signal.SIGTERM, _signal_handler)
signal.pause()
# Kill the qemu process
try:
os.kill(proc.pid, signal.SIGTERM)
except OSError:
pass
shutil.rmtree(directory)
sys.exit(0)
if __name__ == '__main__':
sys.exit(main(sys.argv))

12
tests/tests.yml Normal file
View file

@ -0,0 +1,12 @@
---
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
- container
- atomic
tests:
- Sanity-init-scripts-LSB
required_packages:
- initscripts