2 # Copyright (C) 2014-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
=$(PROJECT_GIT
)/project
/procd.git
15 PKG_MIRROR_HASH
:=1c418d1cba203385b3e5889a83d54ed818cd5817b87f1fb41f7238894a41c908
16 PKG_SOURCE_DATE
:=2025-10-04
17 PKG_SOURCE_VERSION
:=3b3501abb63d9aa59ccc20acf5f2c2be48190b25
23 PKG_MAINTAINER
:=John Crispin
<john@phrozen.org
>
26 PKG_ASLR_PIE_REGULAR
:=1
27 PKG_CONFIG_DEPENDS
:= \
28 CONFIG_TARGET_INIT_PATH CONFIG_KERNEL_SECCOMP CONFIG_PROCD_SHOW_BOOT \
29 CONFIG_KERNEL_NAMESPACES CONFIG_PACKAGE_procd-ujail CONFIG_PACKAGE_procd-seccomp
31 include $(INCLUDE_DIR
)/package.mk
32 include $(INCLUDE_DIR
)/cmake.mk
35 STAMP_CONFIGURED
:=$(strip $(STAMP_CONFIGURED
))_
$(shell echo
$(CONFIG_TARGET_INIT_PATH
) |
$(MKHASH
) md5
)
38 CMAKE_OPTIONS
+= -DEARLY_PATH
="$(TARGET_INIT_PATH)"
40 define Package
/procd
/Default
43 DEPENDS
:=+ubusd
+ubus
+libjson-script
+ubox
+libubox
+libudebug \
44 +libubus
+libblobmsg-json
+libjson-c
+jshn
45 TITLE
:=OpenWrt system process manager
46 USERID
:=:dialout
=20 :audio
=29
50 $(call Package
/procd
/Default
)
52 CONFLICTS
:=procd-selinux
56 define Package
/procd-selinux
57 $(call Package
/procd
/Default
)
58 DEPENDS
+= +libselinux
59 TITLE
+= with SELinux support
64 define Package
/procd-ujail
67 DEPENDS
:=@KERNEL_NAMESPACES
+@KERNEL_UTS_NS
+@KERNEL_IPC_NS
+@KERNEL_PID_NS \
68 +libubox
+libubus
+libuci
+libblobmsg-json
69 TITLE
:=OpenWrt process jail helper
72 define Package
/procd-seccomp
75 DEPENDS
:=@USE_SECCOMP
+libubox
+libblobmsg-json
76 TITLE
:=OpenWrt process seccomp helper
+ utrace
82 DEPENDS
:=+procd-ujail
+libubus
+libubox
+libblobmsg-json
+blockd
+PACKAGE_uxc
:rpcd
83 TITLE
:=OpenWrt container management
84 MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
87 define Package
/procd
/config
89 depends on PACKAGE_procd || PACKAGE_procd-selinux
91 config PROCD_SHOW_BOOT
94 prompt
"Print the shutdown to the console as well as logging it to syslog"
99 ifeq ($(BUILD_VARIANT
),selinux
)
100 CMAKE_OPTIONS
+= -DSELINUX
=1
103 ifeq ($(CONFIG_PROCD_SHOW_BOOT
),y
)
104 CMAKE_OPTIONS
+= -DSHOW_BOOT_ON_CONSOLE
=1
107 ifdef CONFIG_PACKAGE_procd-ujail
108 CMAKE_OPTIONS
+= -DJAIL_SUPPORT
=1
111 SECCOMP
=$(if
$(CONFIG_PACKAGE_procd-seccomp
),1,0)
112 CMAKE_OPTIONS
+= -DSECCOMP_SUPPORT
=$(SECCOMP
) -DUTRACE_SUPPORT
=$(SECCOMP
)
114 define Package
/procd
/install
115 $(INSTALL_DIR
) $(1)/sbin
$(1)/etc
$(1)/lib
/functions
117 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/{init
,procd
,askfirst
,udevtrigger
,upgraded
} $(1)/sbin
/
118 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsetlbf.so
$(1)/lib
119 $(INSTALL_BIN
) .
/files
/reload_config
$(1)/sbin
/
120 $(INSTALL_CONF
) .
/files
/hotplug
*.json
$(1)/etc
/
121 $(INSTALL_DATA
) .
/files
/procd.sh
$(1)/lib
/functions
/
122 $(INSTALL_BIN
) .
/files
/service
$(1)/sbin
/service
125 Package
/procd-selinux
/install = $(Package
/procd
/install)
127 define Package
/procd-ujail
/install
128 $(INSTALL_DIR
) $(1)/sbin
129 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ujail
$(1)/sbin
/
132 define Package
/procd-seccomp
/install
133 $(INSTALL_DIR
) $(1)/sbin
$(1)/lib
134 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpreload-seccomp.so
$(1)/lib
135 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/utrace
$(1)/sbin
/
136 $(LN
) utrace
$(1)/sbin
/seccomp-trace
137 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpreload-trace.so
$(1)/lib
140 define Package
/uxc
/conffiles
144 define Package
/uxc
/install
145 $(INSTALL_DIR
) $(1)/sbin
146 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/uxc
$(1)/sbin
/
147 $(INSTALL_DIR
) $(1)/etc
/init.d
148 $(INSTALL_BIN
) .
/files
/uxc.init
$(1)/etc
/init.d
/uxc
151 $(eval
$(call BuildPackage
,procd
))
152 $(eval
$(call BuildPackage
,procd-selinux
))
153 $(eval
$(call BuildPackage
,procd-ujail
))
154 $(eval
$(call BuildPackage
,procd-seccomp
))
155 $(eval
$(call BuildPackage
,uxc
))