summaryrefslogtreecommitdiff
path: root/packages/redhat
Commit message (Collapse)AuthorAgeFilesLines
* dhclient_hook: remove vestigal dhclient_hook command (#2015)Brett Holman2023-02-281-3/+0
| | | | | | | | | At inception[1], dhclient hooks were used to filter environment variables into /run/cloud-init/dhclient.hooks/<interface>.json which was consumed by WALinuxAgentShim. The fallback method was to parse the dhcp client lease file. Today the Azure datasource directly uses the parsed lease file[2], and loading /run/cloud-init/dhclient.hook/<interface>.json file was removed in 22.2[3]. With no other consumers, we can remove this. [1] https://github.com/canonical/cloud-init/commit/648dbbf6b090c81e989f1ab70bf99f4de16a6a70 [2] https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceAzure.py#L447 [3] https://github.com/canonical/cloud-init/commit/5ad0768a796bc07232476d0d29b5225f1e6e131c
* rpm/copr: ensure RPM represents new clean.d dir artifacts (#1680)Chad Smith2022-08-221-0/+2
| | | | | RPM build errors: Installed (but unpackaged) file(s) found: /etc/cloud/clean.d/README
* redhat spec: udev/rules.d lives under /usr/lib on rhel-based systems (#1536)Chad Smith2022-06-211-1/+1
| | | | | | | | | | Cloud-init now delivers udev rules to /usr/lib/udv/rules.d on rhel-based systems as of commit 7071512. Update spec template to unblock COPR builds of CentOS/8-Stream which fail on RPM build errors like: File not found: /build.../lib/udev/rules.d/66-azure-ephemeral.rules Use spec macro %{_udevrulesdir} instead of hard-coding rules dir.
* Remove xenial references (#1472)Alberto Contreras2022-06-081-5/+0
| | | | | | - Remove references and dead code to Xenial, Eoan, Python < 3.7 - cc_ubuntu_drivers: Use python3-debconf instead of shell script - add integration test for ubuntu_drivers - bump pycloudlib for OCI subnet/jammy fixes
* Allow libexec for hotplug (#1088)James Falcon2021-10-291-7/+0
| | | | | When we added the install hotplug module, we forgot to update the redhet/cloud-init.spec.in file and allow for execution on /usr/libexec. This PR adds that functionality.
* Inhibit sshd-keygen@.service if cloud-init is active (#1028)Ryan Harper2021-10-121-0/+1
| | | | | | | In some cloud-init enabled images the sshd-keygen@.service may race with cloud-init and prevent ssh host keys from being generated or generating host keys twice slowing boot and consuming additional entropy during boot. This drop-in unit adds a condition to the sshd-keygen@.service which prevents running if cloud-init is active.
* Initial hotplug support (#936)James Falcon2021-07-191-0/+7
| | | | | | | | | | | | | | | | | | Adds a udev script which will invoke a hotplug hook script on all net add events. The script will write some udev arguments to a systemd FIFO socket (to ensure we have only instance of cloud-init running at a time), which is then read by a new service that calls a new 'cloud-init devel hotplug-hook' command to handle the new event. This hotplug-hook command will: - Fetch the pickled datsource - Verify that the hotplug event is supported/enabled - Update the metadata for the datasource - Ensure the hotplugged device exists within the datasource - Apply the config change on the datasource metadata - Bring up the new interface (or apply global network configuration) - Save the updated metadata back to the pickle cache Also scattered in some unrelated typing where helpful
* redhat spec: add missing BuildRequires (#552)Paride Legovini2020-08-271-5/+4
| | | | | | | | | | | | | | | | | 456fb55744a1acc6bd2f464b7656a9c33d0b7ac5 made tools/read-dependencies and package/brpm distinguish between build dependencies and runtime dependencies, however packages/redhat/cloud-init.spec.in expects all the dependencies to be in the 'requires' list, thus missing some build dependencies. This change makes cloud-init.spec use 'buildrequires' too. The build happens to succeed without python3-devel on the epel-8 copr chroot as it pulls in the epel-rpm-macros package, which in turn depends on python3-devel. In other words the dependency is satisfied by chance. Packages building for Python 3 need to explicitly specify BuildRequires: python3-devel, see: [1]. [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
* Adapt the package building scripts to use Python 3 (#231)Paride Legovini2020-05-011-6/+4
| | | | | | | | | | | | | | | | | | Since upstream cloud-init has dropped python2 support, adapt remaining package build scripts and tools to python3 only Changes: * Do not template debian/rules as python3 is the only supported version * Drop six from requirements.txt * Makefile: drop everything related to Python 2 * run-container: install the CI deps only on ubuntu|debian * read-version: update the shebang to use Python 3 * brpm: read_dependencies(): drop unused argument * read-dependencies: switch to Py3 and drop the --python-version option * pkg-deps.json: drop the Python version field and update the redhat deps * pkg-deps.json: drop the unittest2 and contextlib2 renames * Update RPM the spec file to use Python 3 when building the RPM * bddeb: drop support for Python 2
* packages: update rpm specs for new bash completion pathDaniel Watkins2019-04-191-1/+3
| | | | LP: #1825444
* Add cloud-id binary to packages for SUSEJason Zions2018-10-251-0/+1
|
* packages: Make rpm spec files patch in package version like in debs.Scott Moser2018-05-231-0/+7
| | | | | This makes the necessary changes to patch the full packaged version into the trunk maintained redhat and suse spec files.
* Implement bash completion script for cloud-init command lineRyan Harper2018-04-171-0/+1
| | | | | In bash shells with bash_completion enabled, now the cloud-init sub commands and parameters/flags will be shown.
* Do not provide systemd-fsck drop-in which could cause ordering cycles.Balint Reczey2017-09-151-6/+0
| | | | | | | | | | | | | | | Revert "centos: do not package systemd-fsck drop-in." Revert "systemd: make systemd-fsck run after cloud-init.service" The systemd-fsck drop-in caused regressions by introducing ordering The change reverts the original commit that added systemd-fsck drop-in and another commit that had removed that from the centos packaging: 1f5489c258a26f4e26261c40786537951d67df1e 8a5296c41db45be3a172862f324ad44e732a2250 The result is to no longer provide the systemd-fsck drop-in. LP: #1717477
* centos: do not package systemd-fsck drop-in.Scott Moser2017-07-261-0/+6
| | | | | | | | | | | | The change here fixes the build of CentOS 7 rpm. The systemd 'drop-in' file systemd-fsck@.service.d/cloud-init.conf is not expected to work on CentOS at the moment. There, the cloud-init-local.service currently runs without DefaultDependencies=no. That would likely cause a dependency loop. The drop-in was added for bug 1691489. It may well be needed at a later date in CentOS also.
* Templatize systemd unit files for cross distro deltas.Ryan Harper2017-07-191-5/+0
| | | | | | Under el7, cloud-init systemd files need some unit tweaks to ensure they run at the right time. Pull in current el7 downstream systemd unit changes.
* pkg build ci: Add make ci-deps-<distro> target to install pkgsChad Smith2017-06-131-46/+32
| | | | | | | | | | | | | | | | | | | | | | This change adds a couple of makefile targets for ci environments to install all necessary dependencies for package builds and test runs. It adds a number of arguments to ./tools/read-dependencies to facilitate reading pip dependencies, translating pip deps to system package names and optionally installing needed system-package dependencies on the local system. This relocates all package dependency and translation logic into ./tools/read-dependencies instead of duplication found in packages/brpm and packages/bddeb. In this branch, we also define buildrequires as including all runtime requires when rendering cloud-init.spec.in and debian/control files because our package build infrastructure will also be running all unit test during the package build process so we need runtime deps at build time. Additionally, this branch converts packages/(redhat|suse)/cloud-init.spec.in from cheetah templates to jinja to allow building python3 envs.
* Use distro release version to determine if we use systemd in redhat specRyan Harper2017-06-091-5/+20
| | | | | | | | The typical rpm build process will examine the spec file to determine which packages should be installed in the boot root. This requires the specfile to declare that it needs system. Provide this information by checking which version in which the rpm is being built and exporting requirements for systemd.
* rhel/centos spec cleanups.Scott Moser2017-06-081-40/+52
| | | | | | | | | | | | | | | | | | | | | | | Many changes here to get us able to build rpms on CentOS 5 or 6 and RHEL. * add 'Requires' as 'BuildRequires' also. This allows us to run cloud-init tools in the build environment, and also will allow us to run tests in the build process. * build for both systemd and upstart (centos 5) init systems. * Add 'centos' as a variant Adding the variant means we can use the 'centos' user as default on centos rather than a 'fedora' or 'rhel'. * drop argparse from the requirements. On any system other than python 2.6, having a 'requirements' that mentions argparse just causes problems. Instead we add that Requires to the spec directly. * list dependency on dmidecode (as redhat distro spec had) * remove duplicate line in files section ({_unitdir}/cloud-*) * Use rpm macros for init-system chunks and drop use of init_system variable template * Add el6 only build-req on python-argparse * python-cheetah is not required in the build environment as the the spec is already rendered. (We will soon move the spec to jinja).
* LICENSE: Allow dual licensing GPL-3 or Apache 2.0Jon Grimm2016-12-221-1/+1
| | | | | | | | | | | | | | | | | | This has been a recurring ask and we had initially just made the change to the cloud-init 2.0 codebase. As the current thinking is we'll just continue to enhance the current codebase, its desirable to relicense to match what we'd intended as part of the 2.0 plan here. - put a brief description of license in LICENSE file - put full license versions in LICENSE-GPLv3 and LICENSE-Apache2.0 - simplify the per-file header to reference LICENSE - tox: ignore H102 (Apache License Header check) Add license header to files that ship. Reformat headers, make sure everything has vi: at end of file. Non-shipping files do not need the copyright header, but at the moment tests/ have it.
* packages/redhat: fix rpm spec file.Scott Moser2016-11-221-2/+3
| | | | | | | | | | | Adjust the redhat spec file to fix errors found during a ./tools/brpm on centos 6: RPM build errors: File listed twice: /usr/libexec/cloud-init/uncloud-init File listed twice: /usr/libexec/cloud-init/write-ssh-key-fingerprints Installed (but unpackaged) file(s) found: /etc/NetworkManager/dispatcher.d/hook-network-manager /etc/dhcp/dhclient-exit-hooks.d/hook-dhclient
* For upstream snapshot versions do not modify git-describe output.Scott Moser2016-08-081-1/+1
| | | | | | | | | | For upstream version directly use the output of git-describe (X.Y.Z-number.gHASH) rather than rather than changing it to (X.Y.Z+number.gHASH). The rpm version does not allow '-' in Version, so we create and use rpm_upstream_version in the rpm spec file. That is of format: X.Y.Z+number.gHASH
* adjust tools and version information.Scott Moser2016-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | upstream snapshots are versioned in the format 'X.Y.Z+<distance>.g<commit>' where X.Y.Z are major, minor, and micro. Distance is number of commits since last annotated tag, and commit is the git commit. bddeb and brpm will now create and use the "upstream version" like above. Things changed here: - tools/make-tarball update cloudinit/version.py to contain the full version support --output support '--long' to always create the long format version string. - bddeb: - use quilt debian source format - use read-version and long version in changelog. - brpm: - change to use read-version and upstream long version in the spec. - flake8 changes - tools/read-version - read version from git or from cloudinit/version. - provide --json output with more nicely formed data.
* Update build tools to work with gitLars Kellogg-Stedman2016-08-031-14/+6
| | | | | | | | - Update HACKING.rst to include git instructions - update MANIFEST.in and .gitignore to ignore git-related things - replaced tarball generation scripts with git-based script - have the spec files correctly identify themselves as cheetah templates - make brpm work with git
* Fixs missing/unpacked rpm filesJoshua Harlow2016-06-301-0/+4
| | | | | | | | | These new files were not getting picked up during packaging (and they need to, otherwise rpm building fails). - 66-azure-ephemeral.rules - cloud-init-generator
* Update with trunk and resolve conflictsJoshua Harlow2014-11-251-0/+5
|\
| * Include the systemd config filesJoshua Harlow2014-10-171-0/+5
| |
* | Use TODO.rst instead of removing itJoshua Harlow2014-10-171-1/+1
| |
* | Ensure the files/dirs are retainedJoshua Harlow2014-10-171-1/+3
| |
* | More spec file tweaksJoshua Harlow2014-10-171-7/+7
| | | | | | | | | | | | - Use _libexecdir for the helper binaries - Use _sharedstatedir instead of /var/lib - Ensure _libexecdir/${name} exists
* | Fix the rpm building (currently broken)Joshua Harlow2014-10-131-3/+6
|/
* remove the 'tools/sudo' file and references in cloud-init.spec.inScott Moser2014-02-101-2/+0
| | | | | I'm not really sure what the function of tools/sudo was, and it was definitely not required for fixing the rpm build.
* Fix sudo cfg. file mode. Require sudo >= 1.7.2p2-3 with sudoers.d support.Vlastimil Holer2014-01-311-4/+3
|
* Added config for sudo. Apply sudo config in RPM for Red Hat.Vlastimil Holer2014-01-311-0/+4
|
* Fix Requires->requirements.txt rename in RPM build.Vlastimil Holer2014-01-311-1/+1
|
* Require sudo package.Vlastimil Holer2014-01-151-0/+1
|
* Make the subrelease a new k/v entry that is handledJoshua Harlow2012-10-081-1/+1
| | | | | differently in the rpm spec file template instead of being joined with the release.
* Add a nice '-p1'Joshua Harlow2012-09-261-1/+1
|
* Ensure the patches get activated.Joshua Harlow2012-09-261-0/+7
|
* Add a top_dir define.Joshua Harlow2012-09-251-0/+4
|
* Fix cheetah syntax error.Joshua Harlow2012-09-251-1/+1
|
* Add the ability to pass patches to theJoshua Harlow2012-09-251-0/+7
| | | | rpm builder utility.
* fix bddeb and brpm: by renaming packaging files that are templatesScott Moser2012-07-091-0/+0
| | | | | | | In cherry picking the cheetah commit, I missed the rename of these files. packages/debian/changelog => packages/debian/changelog.in packages/debian/control => packages/debian/control.in packages/redhat/cloud-init.spec => packages/redhat/cloud-init.spec.in
* Revert back to using cheetah + adjust resultant code + templatesJoshua Harlow2012-07-091-43/+45
| | | | | At this point there is a mixture of "double hash" cheetah comments and '#*' cheetah comments.
* include ~bzr in make-tarball output tarball and top level dirJoshua Harlow2012-07-091-1/+1
| | | | | | | | | | | | output of 'make-tarball' now is tarball with name formatted as: cloud-init-$VERSION~bzr$REVNO.tar.gz Instead of cloud-init-$VERSION-$REVNO.tar.gz The former is desireable for apt at least as the '~' is understood to mean less than. This merges revno 569 and 570 from lp:~harlowja/cloud-init/rework
* Got this working for 'brpm' again.Joshua Harlow2012-07-061-21/+6
|
* setup.py: rename "daemon type" to "init system"Scott Moser2012-07-061-1/+1
| | | | | | This brings with it other changes, and also makes an install install all of the requisite init files. (ie, cloud-init needs the -local and the non-local)
* Add the ability to have setup.py have a CLI option that specifies the daemon ↵Joshua Harlow2012-07-031-29/+9
| | | | | | | type which then later affects the installation of certain config files, which then can be extracted during package creation as needed.
* 1. Fixup the setup.py to not include custom startup scripts, let the ↵Joshua Harlow2012-07-021-25/+154
| | | | | | | packaging solutions handle these 2. Get the cloud-init specfile working for the init.d case (with the right postun and post and install sections) a. It works!!!
* Add in the ability to choose which type of boot type the rpm should haveharlowja2012-06-261-1/+5
| | | | | and adjust the specfile that is generated to remove the unwanted config files for the types which were not selected.