#include <regex.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
+#include <unistd.h>
#define PCRE2_CODE_UNIT_WIDTH 8
#include <pcre2.h>
pakfire_package_set_uuid(*pkg, uuid);
free(uuid);
+ // Set build host
+ char hostname[HOST_NAME_MAX + 1];
+ r = gethostname(hostname, HOST_NAME_MAX + 1);
+ if (r) {
+ ERROR(parser->pakfire, "gethostname() failed: %s\n", strerror(errno));
+ goto CLEANUP;
+ }
+
+ pakfire_package_set_build_host(*pkg, hostname);
+
+ // Set build time
+ time_t now = time(NULL);
+
+ pakfire_package_set_build_time(*pkg, now);
+
// Assign more attributes
const struct attribute {
const char* name;