-
Notifications
You must be signed in to change notification settings - Fork 51
Initial folder and SPEC file creation for PMA #327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2b35413
Intial commit for PMA
jagratac 17699c5
Updated signatures.json for PMA
jagratac a6cae62
Updated SHA256 for signatures.json file
jagratac 2c5f9a1
Update signatures file
jagratac b8166c9
updated the changes for spec and signatures.json
jagratac 189f4ca
include-pma-in-vpro-pkglist
jagratac 790835b
updated SPEC and servcie files
jagratac 3aa4e5a
Merge branch '3.0-dev' into pma-dev
jagratac ab2409b
Merge branch '3.0-dev' into pma-dev
jagratac e53d5e2
Updated EMT files and scripts
jagratac bbfc4c1
Updated EMT files and scripts
jagratac 56547b0
Merge branch 'pma-dev' of https://github.com/open-edge-platform/edge-…
jagratac ce2c482
Merge branch '3.0-dev' into pma-dev
punam20 9c9f7ae
Updated file with latest VERSION
jagratac e32ab32
Merge branch 'pma-dev' of https://github.com/open-edge-platform/edge-…
jagratac 20f6daa
Updated Node-agent version in cgmanifest.json
jagratac 13d8483
Updated changelogs
jagratac 47587b8
Merge branch '3.0-dev' into pma-dev
sfonn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eu | ||
|
|
||
| update_infra_url() { | ||
| if [ -n "$PLATFORM_MANAGEABILITY_URL" ]; then | ||
| local UPDATED_PM_DISCOVERY_INFRA_URL | ||
| UPDATED_PM_DISCOVERY_INFRA_URL=$(sed "s/^ serviceURL: '.*'/ serviceURL: '$PLATFORM_MANAGEABILITY_URL'/" /etc/edge-node/node/confs/platform-manageability-agent.yaml) | ||
| echo -E "${UPDATED_PM_DISCOVERY_INFRA_URL}" > /etc/edge-node/node/confs/platform-manageability-agent.yaml | ||
| fi | ||
|
|
||
| if [ -n "$RPS_ADDRESS" ]; then | ||
| local UPDATED_RPS_DISCOVERY_INFRA_URL | ||
| UPDATED_RPS_DISCOVERY_INFRA_URL=$(sed "s/^rpsAddress: '.*'/rpsAddress: '$RPS_ADDRESS'/" /etc/edge-node/node/confs/platform-manageability-agent.yaml) | ||
| echo -E "${UPDATED_RPS_DISCOVERY_INFRA_URL}" > /etc/edge-node/node/confs/platform-manageability-agent.yaml | ||
| fi | ||
| } | ||
|
|
||
| update_infra_url | ||
|
|
||
| exec "$@" | ||
2 changes: 2 additions & 0 deletions
2
SPECS/platform-manageability-agent/platform-manageability-agent.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| g bm-agents 500 | ||
| u pm-agent -:bm-agents - - /usr/sbin/nologin |
40 changes: 40 additions & 0 deletions
40
SPECS/platform-manageability-agent/platform-manageability-agent.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [Unit] | ||
| Description=Platform Manageability Agent | ||
| Documentation=https://github.com/open-edge-platform/edge-node-agents/blob/main/platform-manageability-agent/README.md | ||
|
|
||
| [Service] | ||
| ExecStart=/etc/edge-node/node/confs/pm-agent /usr/bin/pm-agent -config /etc/edge-node/node/confs/platform-manageability-agent.yaml | ||
| EnvironmentFile=/etc/edge-node/node/agent_variables | ||
| StandardOutput=journal | ||
| StandardError=journal | ||
| RestartSec=60 | ||
| Restart=on-failure | ||
| Group=bm-agents | ||
| User=pm-agent | ||
| CPUQuota=20% | ||
| MemoryMax=128M | ||
|
|
||
| PrivateTmp=yes | ||
| ProtectControlGroups=yes | ||
| ProtectKernelModules=yes | ||
| ProtectKernelTunables=yes | ||
| RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK | ||
| RestrictNamespaces=yes | ||
| RestrictRealtime=yes | ||
| RestrictSUIDSGID=yes | ||
| MemoryDenyWriteExecute=yes | ||
| LockPersonality=yes | ||
| ProtectClock=yes | ||
| ProtectHostname=yes | ||
| ProtectKernelLogs=yes | ||
|
|
||
| CapabilityBoundingSet=~CAP_LINUX_IMMUTABLE CAP_IPC_LOCK CAP_SYS_CHROOT CAP_BLOCK_SUSPEND CAP_LEASE | ||
| CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_PTRACE CAP_SYS_RAWIO CAP_SYS_TIME CAP_SYS_TTY_CONFIG | ||
| CapabilityBoundingSet=~CAP_WAKE_ALARM CAP_MAC_ADMIN CAP_MAC_OVERRIDE | ||
| CapabilityBoundingSet=~CAP_SETPCAP CAP_CHOWN CAP_NET_ADMIN | ||
| CapabilityBoundingSet=~CAP_CHOWN CAP_FSETID CAP_SETFCAP | ||
| CapabilityBoundingSet=~CAP_DAC_READ_SEARCH CAP_FOWNER CAP_IPC_OWNER | ||
| CapabilityBoundingSet=~CAP_KILL CAP_MKNOD CAP_BPF CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target |
9 changes: 9 additions & 0 deletions
9
SPECS/platform-manageability-agent/platform-manageability-agent.signatures.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "Signatures": { | ||
| "pm-agent-0.1.3.tar.gz": "5f7465881870267e3c50c61cc7fa54399b056b85e67d2d5444fcbaa52c24f131", | ||
| "platform-manageability-agent.service": "fdd68c7ab244785c4dda515bb0daff7abf75dec45ffa8e99f1f0c6e50fa1355d", | ||
| "env_wrapper.sh": "a1b68c509483801ec33ce810c7d3ab272b930a75add43370713b64ac2306a746", | ||
| "platform-manageability-agent.conf": "efe3d39585266222720a828f4617a25beaf6e6334ee7d9bfa57fba4e4bd7f6ef", | ||
| "platform-manageability-agent.sudoers": "c6129ef5c01b6e56db8b829e3f0cc1cf5a0333764120ef242d2a4a6df9334015" | ||
| } | ||
jagratac marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
82 changes: 82 additions & 0 deletions
82
SPECS/platform-manageability-agent/platform-manageability-agent.spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| Summary: Platform managebility agent for out of band opration. | ||
| Name: platform-manageability-agent | ||
| Version: 0.1.3 | ||
| Release: 1%{?dist} | ||
| License: Apache-2.0 | ||
| Vendor: Intel Corporation | ||
| Distribution: Edge Microvisor Toolkit | ||
| URL: https://github.com/open-edge-platform/edge-node-agents | ||
| Source0: %{url}/archive/refs/tags/%{name}/v%{version}.tar.gz#/pm-agent-%{version}.tar.gz | ||
| Source1: %{name}.conf | ||
| Source2: %{name}.service | ||
| Source3: env_wrapper.sh | ||
| Source4: %{name}.sudoers | ||
| BuildRequires: golang >= 1.24.4 | ||
| BuildRequires: systemd-rpm-macros | ||
| Requires: rpc | ||
|
|
||
| %global debug_package %{nil} | ||
| %global _build_id_links none | ||
| %global modulename pm_agent | ||
|
|
||
| %description | ||
| platform-manageability-agent detects what manageability features are available after the OS is deployed | ||
| and performs device management operations requested by users. | ||
|
|
||
| %prep | ||
| %autosetup -n pm-agent-%{version} | ||
|
|
||
| %build | ||
| make pmabuild GO_MOD=vendor | ||
|
|
||
|
|
||
| %install | ||
| make pmainstall DESTDIR=%{buildroot} PREFIX=%{_prefix} | ||
|
|
||
| mkdir -p %{buildroot}%{_sysusersdir} | ||
| cp %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf | ||
|
|
||
| mkdir -p %{buildroot}%{_unitdir} | ||
| cp %{SOURCE2} %{buildroot}%{_unitdir} | ||
|
|
||
| install -d -m 755 %{buildroot}%{_sysconfdir}/edge-node/node/confs | ||
| install -m 644 configs/platform-manageability-agent.yaml %{buildroot}%{_sysconfdir}/edge-node/node/confs/platform-manageability-agent.yaml | ||
| install -m 744 %{SOURCE3} %{buildroot}%{_sysconfdir}/edge-node/node/confs/pm-agent | ||
|
|
||
| mkdir -p %{buildroot}%{_sysconfdir}/sudoers.d | ||
| cp %{SOURCE4} %{buildroot}%{_sysconfdir}/sudoers.d/platform-manageability-agent | ||
|
|
||
| mkdir -p %{buildroot}%{_defaultlicensedir}/%{name} | ||
| cp copyright %{buildroot}%{_defaultlicensedir}/%{name} | ||
|
|
||
|
|
||
| %files | ||
| %{_bindir}/pm-agent | ||
| %{_unitdir}/%{name}.service | ||
| %{_sysusersdir}/%{name}.conf | ||
|
|
||
| %config %attr(-, -, bm-agents) %{_sysconfdir}/edge-node/node/confs | ||
| %config %attr(-, pm-agent, bm-agents) %{_sysconfdir}/edge-node/node/confs/platform-manageability-agent.yaml | ||
| %config %attr(-, pm-agent, bm-agents) %{_sysconfdir}/edge-node/node/confs/pm-agent | ||
| %config %{_sysconfdir}/sudoers.d/platform-manageability-agent | ||
|
|
||
| %license %{_defaultlicensedir}/%{name}/copyright | ||
|
|
||
| %pre | ||
| %sysusers_create_package %{name} %{SOURCE1} | ||
|
|
||
| %post | ||
| %{systemd_post %{name}.service} | ||
|
|
||
| %preun | ||
| %{systemd_preun %{name}.service} | ||
|
|
||
| %postun | ||
| %{systemd_postun_with_restart %{name}.service} | ||
|
|
||
| %changelog | ||
| * Wed Jul 30 2025 Jagrat Acharya <jagrat.acharya@intel.com> - 0.1.3-1 | ||
| - Binary name updated in spec file. | ||
| - Original version for Edge Microvisor Toolkit. License verified. | ||
|
|
||
|
|
1 change: 1 addition & 0 deletions
1
SPECS/platform-manageability-agent/platform-manageability-agent.sudoers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| pm-agent ALL=(root) NOPASSWD:/usr/bin/rpc,/usr/sbin/dmidecode,/usr/bin/systemctl,/usr/sbin/modprobe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| { | ||
| "packages": [ | ||
| "platform-manageability-agent", | ||
| "rpc", | ||
| "intel-lms" | ||
| ] | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.