From 9685f37575809cd0faccd329c9601eaefc4323ad Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Sun, 3 May 2015 14:29:15 -0700 Subject: [PATCH 1/3] *: adjust copyright header Inspired by a similar change in the Kubernetes project [1], this changes the copyright header to the more generic "The rkt Authors" rather than "CoreOS, Inc.", which is only sometimes correct. https://github.com/GoogleCloudPlatform/kubernetes/commit/6b3a6e6b983f967c88d14d26542ec6e30c49ebd3 --- NOTICE | 2 +- common/apps/apps.go | 2 +- common/common.go | 2 +- networking/net_plugin.go | 2 +- networking/netinfo/netinfo.go | 2 +- networking/networking.go | 2 +- networking/podenv.go | 2 +- networking/portfwd.go | 2 +- pkg/aci/aci.go | 2 +- pkg/keystore/keystore.go | 2 +- pkg/keystore/keystore_test.go | 2 +- pkg/keystore/keystoretest/keygen.go | 2 +- pkg/keystore/keystoretest/opengpg.go | 2 +- pkg/lock/dir.go | 2 +- pkg/lock/dir_test.go | 2 +- pkg/lock/keylock.go | 2 +- pkg/lock/keylock_test.go | 2 +- pkg/tar/tar.go | 2 +- pkg/tar/tar_test.go | 2 +- pkg/tar/utimes_linux.go | 2 +- pkg/tar/utimes_unsupported.go | 2 +- rkt/cli_apps.go | 2 +- rkt/cli_apps_test.go | 2 +- rkt/config/auth.go | 2 +- rkt/config/config.go | 2 +- rkt/config/config_test.go | 2 +- rkt/doc.go | 2 +- rkt/enter.go | 2 +- rkt/fetch.go | 2 +- rkt/fetch_test.go | 2 +- rkt/gc.go | 2 +- rkt/help.go | 2 +- rkt/images.go | 2 +- rkt/imageslist.go | 2 +- rkt/install.go | 2 +- rkt/install_test.go | 2 +- rkt/list.go | 2 +- rkt/metadata_service.go | 2 +- rkt/metadata_service_test.go | 2 +- rkt/pods.go | 2 +- rkt/prepare.go | 2 +- rkt/rkt.go | 2 +- rkt/rmimage.go | 2 +- rkt/run.go | 2 +- rkt/run_prepared.go | 2 +- rkt/status.go | 2 +- rkt/trust.go | 2 +- rkt/uuid.go | 2 +- rkt/version.go | 2 +- stage0/enter.go | 2 +- stage0/entrypoint.go | 2 +- stage0/gc.go | 2 +- stage0/run.go | 2 +- stage1/gc/gc.go | 2 +- stage1/init/init.go | 2 +- stage1/init/path.go | 2 +- stage1/init/pod.go | 2 +- stage1/init/pod_test.go | 2 +- stage1/init/registration.go | 2 +- stage1/rootfs/diagexec/diagexec.c | 2 +- stage1/rootfs/diagexec/elf.h | 2 +- stage1/rootfs/enter/enter.c | 2 +- stage1/rootfs/prepare-app/prepare-app.c | 2 +- stage1/rootfs/shim/shim.c | 2 +- store/db.go | 2 +- store/migrate.go | 2 +- store/migrate_test.go | 2 +- store/remote.go | 2 +- store/remote_test.go | 2 +- store/store.go | 2 +- store/store_test.go | 2 +- store/utils.go | 2 +- tests/inspect/inspect.go | 2 +- tests/rkt_auth_test.go | 2 +- tests/rkt_caps_test.go | 2 +- tests/rkt_env_test.go | 2 +- tests/rkt_exit_test.go | 2 +- tests/rkt_interactive_test.go | 2 +- tests/rkt_tests.go | 2 +- tests/rkt_volume_test.go | 2 +- tests/test-auth-server/aci/aci.go | 2 +- tests/test-auth-server/aci/commands.go | 2 +- tests/test-auth-server/aci/server.go | 2 +- tests/test-auth-server/main.go | 2 +- version/version.go | 2 +- 85 files changed, 85 insertions(+), 85 deletions(-) diff --git a/NOTICE b/NOTICE index b39ddfa..87ea50f 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ CoreOS Project Copyright 2014 CoreOS, Inc -This product includes software developed at CoreOS, Inc. +This product includes software developed at The rkt Authors (http://www.coreos.com/). diff --git a/common/apps/apps.go b/common/apps/apps.go index 7b08384..0c63a8f 100644 --- a/common/apps/apps.go +++ b/common/apps/apps.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/common/common.go b/common/common.go index baba7ab..9a37a62 100644 --- a/common/common.go +++ b/common/common.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/networking/net_plugin.go b/networking/net_plugin.go index 5cde70a..f7fa3b0 100644 --- a/networking/net_plugin.go +++ b/networking/net_plugin.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/networking/netinfo/netinfo.go b/networking/netinfo/netinfo.go index 41ceea1..4f504c9 100644 --- a/networking/netinfo/netinfo.go +++ b/networking/netinfo/netinfo.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/networking/networking.go b/networking/networking.go index 19090f2..9665076 100644 --- a/networking/networking.go +++ b/networking/networking.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/networking/podenv.go b/networking/podenv.go index af5e92f..01c3988 100644 --- a/networking/podenv.go +++ b/networking/podenv.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/networking/portfwd.go b/networking/portfwd.go index 80cb26f..ba0d213 100644 --- a/networking/portfwd.go +++ b/networking/portfwd.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/aci/aci.go b/pkg/aci/aci.go index b526ed9..584550c 100644 --- a/pkg/aci/aci.go +++ b/pkg/aci/aci.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/keystore/keystore.go b/pkg/keystore/keystore.go index acbe694..9dfa3d0 100644 --- a/pkg/keystore/keystore.go +++ b/pkg/keystore/keystore.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/keystore/keystore_test.go b/pkg/keystore/keystore_test.go index 7ffe3e2..b95f282 100644 --- a/pkg/keystore/keystore_test.go +++ b/pkg/keystore/keystore_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/keystore/keystoretest/keygen.go b/pkg/keystore/keystoretest/keygen.go index d4bf212..0384e0f 100644 --- a/pkg/keystore/keystoretest/keygen.go +++ b/pkg/keystore/keystoretest/keygen.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/keystore/keystoretest/opengpg.go b/pkg/keystore/keystoretest/opengpg.go index 9fc355a..ef49abe 100644 --- a/pkg/keystore/keystoretest/opengpg.go +++ b/pkg/keystore/keystoretest/opengpg.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/lock/dir.go b/pkg/lock/dir.go index 265a276..78b59d2 100644 --- a/pkg/lock/dir.go +++ b/pkg/lock/dir.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/lock/dir_test.go b/pkg/lock/dir_test.go index fb86626..b55c5ce 100644 --- a/pkg/lock/dir_test.go +++ b/pkg/lock/dir_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/lock/keylock.go b/pkg/lock/keylock.go index b91cda5..8370181 100644 --- a/pkg/lock/keylock.go +++ b/pkg/lock/keylock.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/lock/keylock_test.go b/pkg/lock/keylock_test.go index 56cc9f1..0ab6a8b 100644 --- a/pkg/lock/keylock_test.go +++ b/pkg/lock/keylock_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/tar/tar.go b/pkg/tar/tar.go index 333ab86..df6d957 100644 --- a/pkg/tar/tar.go +++ b/pkg/tar/tar.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/tar/tar_test.go b/pkg/tar/tar_test.go index d97f51a..9200e0c 100644 --- a/pkg/tar/tar_test.go +++ b/pkg/tar/tar_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/tar/utimes_linux.go b/pkg/tar/utimes_linux.go index 77b89e9..8c54219 100644 --- a/pkg/tar/utimes_linux.go +++ b/pkg/tar/utimes_linux.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/tar/utimes_unsupported.go b/pkg/tar/utimes_unsupported.go index 0241581..ffd3584 100644 --- a/pkg/tar/utimes_unsupported.go +++ b/pkg/tar/utimes_unsupported.go @@ -1,6 +1,6 @@ // +build !linux -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/cli_apps.go b/rkt/cli_apps.go index 8a9b7a3..305f555 100644 --- a/rkt/cli_apps.go +++ b/rkt/cli_apps.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/cli_apps_test.go b/rkt/cli_apps_test.go index adaf201..869d73c 100644 --- a/rkt/cli_apps_test.go +++ b/rkt/cli_apps_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/config/auth.go b/rkt/config/auth.go index e7e09ad..c0cce1b 100644 --- a/rkt/config/auth.go +++ b/rkt/config/auth.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/config/config.go b/rkt/config/config.go index d13ffca..accf19e 100644 --- a/rkt/config/config.go +++ b/rkt/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/config/config_test.go b/rkt/config/config_test.go index 0be81ae..7068069 100644 --- a/rkt/config/config_test.go +++ b/rkt/config/config_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/doc.go b/rkt/doc.go index d32c2c8..fb93123 100644 --- a/rkt/doc.go +++ b/rkt/doc.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/enter.go b/rkt/enter.go index 45f5615..2dd8528 100644 --- a/rkt/enter.go +++ b/rkt/enter.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/fetch.go b/rkt/fetch.go index 00265a1..7dafbf0 100644 --- a/rkt/fetch.go +++ b/rkt/fetch.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/fetch_test.go b/rkt/fetch_test.go index c310fa3..ab20366 100644 --- a/rkt/fetch_test.go +++ b/rkt/fetch_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/gc.go b/rkt/gc.go index 199f2e4..0e337ed 100644 --- a/rkt/gc.go +++ b/rkt/gc.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/help.go b/rkt/help.go index 1f83586..44f021f 100644 --- a/rkt/help.go +++ b/rkt/help.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/images.go b/rkt/images.go index 91f5fd3..da794ab 100644 --- a/rkt/images.go +++ b/rkt/images.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/imageslist.go b/rkt/imageslist.go index c0ca895..4865c8c 100644 --- a/rkt/imageslist.go +++ b/rkt/imageslist.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/install.go b/rkt/install.go index 958b1d3..e6a7cb7 100644 --- a/rkt/install.go +++ b/rkt/install.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/install_test.go b/rkt/install_test.go index d104fcb..0ac9c5d 100644 --- a/rkt/install_test.go +++ b/rkt/install_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/list.go b/rkt/list.go index d270951..56e94ff 100644 --- a/rkt/list.go +++ b/rkt/list.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/metadata_service.go b/rkt/metadata_service.go index 7462a45..204e76e 100644 --- a/rkt/metadata_service.go +++ b/rkt/metadata_service.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/metadata_service_test.go b/rkt/metadata_service_test.go index 1689aaf..3554588 100644 --- a/rkt/metadata_service_test.go +++ b/rkt/metadata_service_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/pods.go b/rkt/pods.go index 0b196ce..34a19ae 100644 --- a/rkt/pods.go +++ b/rkt/pods.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/prepare.go b/rkt/prepare.go index c6f47ad..e255808 100644 --- a/rkt/prepare.go +++ b/rkt/prepare.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/rkt.go b/rkt/rkt.go index f4c1c20..3eab8cd 100644 --- a/rkt/rkt.go +++ b/rkt/rkt.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/rmimage.go b/rkt/rmimage.go index b3fc962..13c415e 100644 --- a/rkt/rmimage.go +++ b/rkt/rmimage.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/run.go b/rkt/run.go index 8b41418..0c431a4 100644 --- a/rkt/run.go +++ b/rkt/run.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/run_prepared.go b/rkt/run_prepared.go index 1ea5b3c..1ecd839 100644 --- a/rkt/run_prepared.go +++ b/rkt/run_prepared.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/status.go b/rkt/status.go index 796b6ce..763d43e 100644 --- a/rkt/status.go +++ b/rkt/status.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/trust.go b/rkt/trust.go index cda9bdf..4e3c6b9 100644 --- a/rkt/trust.go +++ b/rkt/trust.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/uuid.go b/rkt/uuid.go index 98d4f7d..44fbc0c 100644 --- a/rkt/uuid.go +++ b/rkt/uuid.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rkt/version.go b/rkt/version.go index 370d121..3317458 100644 --- a/rkt/version.go +++ b/rkt/version.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage0/enter.go b/stage0/enter.go index 21a5f90..c33be42 100644 --- a/stage0/enter.go +++ b/stage0/enter.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage0/entrypoint.go b/stage0/entrypoint.go index b4ba6c2..d182b3c 100644 --- a/stage0/entrypoint.go +++ b/stage0/entrypoint.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage0/gc.go b/stage0/gc.go index 8b737b7..6119699 100644 --- a/stage0/gc.go +++ b/stage0/gc.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage0/run.go b/stage0/run.go index 6fc1c49..2fa4644 100644 --- a/stage0/run.go +++ b/stage0/run.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/gc/gc.go b/stage1/gc/gc.go index e7bb8cc..c50e8ae 100644 --- a/stage1/gc/gc.go +++ b/stage1/gc/gc.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/init/init.go b/stage1/init/init.go index 034cf07..5affa62 100644 --- a/stage1/init/init.go +++ b/stage1/init/init.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/init/path.go b/stage1/init/path.go index e01d6d3..b33ee36 100644 --- a/stage1/init/path.go +++ b/stage1/init/path.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/init/pod.go b/stage1/init/pod.go index d55eb5c..cdda134 100644 --- a/stage1/init/pod.go +++ b/stage1/init/pod.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/init/pod_test.go b/stage1/init/pod_test.go index 924a94f..8220a38 100644 --- a/stage1/init/pod_test.go +++ b/stage1/init/pod_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/init/registration.go b/stage1/init/registration.go index 4b1ed78..e2d22f1 100644 --- a/stage1/init/registration.go +++ b/stage1/init/registration.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/rootfs/diagexec/diagexec.c b/stage1/rootfs/diagexec/diagexec.c index 21aa12f..8d2e782 100644 --- a/stage1/rootfs/diagexec/diagexec.c +++ b/stage1/rootfs/diagexec/diagexec.c @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/rootfs/diagexec/elf.h b/stage1/rootfs/diagexec/elf.h index 284e060..9f0c984 100644 --- a/stage1/rootfs/diagexec/elf.h +++ b/stage1/rootfs/diagexec/elf.h @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/rootfs/enter/enter.c b/stage1/rootfs/enter/enter.c index 509a95a..5cc624b 100644 --- a/stage1/rootfs/enter/enter.c +++ b/stage1/rootfs/enter/enter.c @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/rootfs/prepare-app/prepare-app.c b/stage1/rootfs/prepare-app/prepare-app.c index 4eb3d83..7175828 100644 --- a/stage1/rootfs/prepare-app/prepare-app.c +++ b/stage1/rootfs/prepare-app/prepare-app.c @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stage1/rootfs/shim/shim.c b/stage1/rootfs/shim/shim.c index 3b0ffa5..c376163 100644 --- a/stage1/rootfs/shim/shim.c +++ b/stage1/rootfs/shim/shim.c @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/db.go b/store/db.go index 4803ba3..23d437a 100644 --- a/store/db.go +++ b/store/db.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/migrate.go b/store/migrate.go index 5a90621..f01c5e0 100644 --- a/store/migrate.go +++ b/store/migrate.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/migrate_test.go b/store/migrate_test.go index 8a5a241..82de254 100644 --- a/store/migrate_test.go +++ b/store/migrate_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/remote.go b/store/remote.go index 69fd444..8841de5 100644 --- a/store/remote.go +++ b/store/remote.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/remote_test.go b/store/remote_test.go index bf23abe..c792150 100644 --- a/store/remote_test.go +++ b/store/remote_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/store.go b/store/store.go index 719c692..a4f8deb 100644 --- a/store/store.go +++ b/store/store.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/store_test.go b/store/store_test.go index 0c492d5..868b4ba 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/store/utils.go b/store/utils.go index 9b22f0a..376216c 100644 --- a/store/utils.go +++ b/store/utils.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/inspect/inspect.go b/tests/inspect/inspect.go index ee9a20e..b1c50ac 100644 --- a/tests/inspect/inspect.go +++ b/tests/inspect/inspect.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/rkt_auth_test.go b/tests/rkt_auth_test.go index efba529..8597d72 100644 --- a/tests/rkt_auth_test.go +++ b/tests/rkt_auth_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/rkt_caps_test.go b/tests/rkt_caps_test.go index b923e0a..9916096 100644 --- a/tests/rkt_caps_test.go +++ b/tests/rkt_caps_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/rkt_env_test.go b/tests/rkt_env_test.go index 9b9662f..f279022 100644 --- a/tests/rkt_env_test.go +++ b/tests/rkt_env_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/rkt_exit_test.go b/tests/rkt_exit_test.go index 318347b..911e8d5 100644 --- a/tests/rkt_exit_test.go +++ b/tests/rkt_exit_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/rkt_interactive_test.go b/tests/rkt_interactive_test.go index 3e4cef5..751934b 100644 --- a/tests/rkt_interactive_test.go +++ b/tests/rkt_interactive_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/rkt_tests.go b/tests/rkt_tests.go index d7a5638..ad68adf 100644 --- a/tests/rkt_tests.go +++ b/tests/rkt_tests.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/rkt_volume_test.go b/tests/rkt_volume_test.go index c15ec1f..f51814c 100644 --- a/tests/rkt_volume_test.go +++ b/tests/rkt_volume_test.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/test-auth-server/aci/aci.go b/tests/test-auth-server/aci/aci.go index 776104c..2c5b1d5 100644 --- a/tests/test-auth-server/aci/aci.go +++ b/tests/test-auth-server/aci/aci.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/test-auth-server/aci/commands.go b/tests/test-auth-server/aci/commands.go index eef1488..36136a1 100644 --- a/tests/test-auth-server/aci/commands.go +++ b/tests/test-auth-server/aci/commands.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/test-auth-server/aci/server.go b/tests/test-auth-server/aci/server.go index 2fe4926..98fc2b6 100644 --- a/tests/test-auth-server/aci/server.go +++ b/tests/test-auth-server/aci/server.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/test-auth-server/main.go b/tests/test-auth-server/main.go index e9b1abc..faebf02 100644 --- a/tests/test-auth-server/main.go +++ b/tests/test-auth-server/main.go @@ -1,4 +1,4 @@ -// Copyright 2015 CoreOS, Inc. +// Copyright 2015 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/version/version.go b/version/version.go index 4df9535..f022ec7 100644 --- a/version/version.go +++ b/version/version.go @@ -1,4 +1,4 @@ -// Copyright 2014 CoreOS, Inc. +// Copyright 2014 The rkt Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From ffb4e12211d749a2b5c82d888267efc5cfa79a26 Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Sun, 3 May 2015 14:37:49 -0700 Subject: [PATCH 2/3] *: remove NOTICE From http://www.apache.org/dev/licensing-howto.html#mod-notice: The NOTICE file is described in section 4.4 of the Apache License version 2.0. It presence is not mandated by the license itself, but by ASF policy. With the move to preferring "The rkt Authors" over "CoreOS, Inc.", the continuing presence of the NOTICE will be confusing and superfluous. --- NOTICE | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 NOTICE diff --git a/NOTICE b/NOTICE deleted file mode 100644 index 87ea50f..0000000 --- a/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -CoreOS Project -Copyright 2014 CoreOS, Inc - -This product includes software developed at The rkt Authors -(http://www.coreos.com/). From 3cbfa313f9ffffd0d4668767dfba5d03149ec854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iago=20L=C3=B3pez=20Galeiras?= Date: Thu, 7 May 2015 13:53:37 -0700 Subject: [PATCH 3/3] stage1: use systemd-nspawn's --keep-unit If we're running from a unit file, we pass --keep-unit to systemd-nspawn to avoid being moved to a different cgroup. --- stage1/init/init.go | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/stage1/init/init.go b/stage1/init/init.go index b8953cd..29ed692 100644 --- a/stage1/init/init.go +++ b/stage1/init/init.go @@ -16,6 +16,21 @@ package main +// #cgo LDFLAGS: -ldl +// #include +// #include +// +// int +// my_sd_pid_get_owner_uid(void *f, pid_t pid, uid_t *uid) +// { +// int (*sd_pid_get_owner_uid)(pid_t, uid_t *); +// +// sd_pid_get_owner_uid = (int (*)(pid_t, uid_t *))f; +// return sd_pid_get_owner_uid(pid, uid); +// } +// +import "C" + // this implements /init of stage1/nspawn+systemd import ( @@ -188,6 +203,15 @@ func getArgsEnv(p *Pod, debug bool) ([]string, []string, error) { args = append(args, "--quiet") // silence most nspawn output (log_warning is currently not covered by this) } + keepUnit, err := runningFromUnitFile() + if err != nil { + return nil, nil, fmt.Errorf("error determining if we're running from a unit file: %v", err) + } + + if keepUnit { + args = append(args, "--keep-unit") + } + nsargs, err := p.PodToNspawnArgs() if err != nil { return nil, nil, fmt.Errorf("Failed to generate nspawn args: %v", err) @@ -344,6 +368,43 @@ func stage1() int { return 0 } +func runningFromUnitFile() (ret bool, err error) { + handle := C.dlopen(C.CString("libsystemd-login.so"), C.RTLD_LAZY) + if handle == nil { + // we can't open libsystemd-login.so so we assume systemd is not + // installed and we're not running from a unit file + ret = false + return + } + defer func() { + if r := C.dlclose(handle); r != 0 { + err = fmt.Errorf("error closing libsystemd-login.so") + } + }() + + sd_pid_get_owner_uid := C.dlsym(handle, C.CString("sd_pid_get_owner_uid")) + if sd_pid_get_owner_uid == nil { + err = fmt.Errorf("error resolving sd_pid_get_owner_uid function") + return + } + + var uid C.uid_t + errno := C.my_sd_pid_get_owner_uid(sd_pid_get_owner_uid, 0, &uid) + // when we're running from a unit file, sd_pid_get_owner_uid returns + // ENOENT (systemd <220) or ENXIO (systemd >=220) + switch { + case errno >= 0: + ret = false + return + case syscall.Errno(-errno) == syscall.ENOENT || syscall.Errno(-errno) == syscall.ENXIO: + ret = true + return + default: + err = fmt.Errorf("error calling sd_pid_get_owner_uid: %v", syscall.Errno(-errno)) + return + } +} + func main() { flag.Parse()