If you brought a repellent such as pepper spray, don't bury it in your pack. Keep it as accessible as possible. Most pepper spray comes in a holster or somehow conveniently attaches to your belt or pack. Such protection won't do you any good if you can't have it ready to fire in one or two seconds. Before hitting the trail, read the directions carefully and test fire the spray.
Nobody likes rules and regulations.
However, national parks and forests have a few that you must follow. These rules aren't meant to take the freedom out of your trip. They are meant to help bring you back safely. When you get a backcountry camping permit in a national park, you get a list of these rules. In some cases, they are printed right on your permit.